Added espstrutils
This commit is contained in:
16
src/espstrutils.cpp
Normal file
16
src/espstrutils.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#include "espstrutils.h"
|
||||
|
||||
namespace espcpputils {
|
||||
|
||||
std::string toString(sntp_sync_mode_t val)
|
||||
{
|
||||
switch (val)
|
||||
{
|
||||
case SNTP_SYNC_MODE_IMMED: return "SNTP_SYNC_MODE_IMMED";
|
||||
case SNTP_SYNC_MODE_SMOOTH: return "SNTP_SYNC_MODE_SMOOTH";
|
||||
}
|
||||
|
||||
return std::string{"Unknown sntp_sync_mode_t("} + std::to_string(int(val)) + ')';
|
||||
}
|
||||
|
||||
} // namespace espcpputils
|
||||
Reference in New Issue
Block a user