diff --git a/code/espurna/config/general.h b/code/espurna/config/general.h index 837c4490..f6f76fcd 100644 --- a/code/espurna/config/general.h +++ b/code/espurna/config/general.h @@ -33,7 +33,8 @@ //------------------------------------------------------------------------------ #ifndef DEBUG_LOG_MODE -#define DEBUG_LOG_MODE DebugLogMode::ENABLED +#define DEBUG_LOG_MODE DebugLogMode::Enabled // Set global logger mode. One of: + // ::Enabled, ::Disabled or ::SkipBoot #endif // Serial debug log diff --git a/code/espurna/debug.h b/code/espurna/debug.h index 9f742411..f4de095f 100644 --- a/code/espurna/debug.h +++ b/code/espurna/debug.h @@ -16,9 +16,9 @@ class PrintRaw; class PrintHex; enum class DebugLogMode : int { - DISABLED = 0, - ENABLED = 1, - SKIP_BOOT = 2 + Disabled = 0, + Enabled = 1, + SkipBoot = 2 }; bool debugLogBuffer(); diff --git a/code/espurna/debug.ino b/code/espurna/debug.ino index cb528b3a..f6a38dc6 100644 --- a/code/espurna/debug.ino +++ b/code/espurna/debug.ino @@ -281,12 +281,12 @@ void debugSetup() { String _debugLogModeSerialize(DebugLogMode value) { switch (value) { - case DebugLogMode::DISABLED: + case DebugLogMode::Disabled: return "0"; - case DebugLogMode::SKIP_BOOT: + case DebugLogMode::SkipBoot: return "2"; default: - case DebugLogMode::ENABLED: + case DebugLogMode::Enabled: return "1"; } } @@ -294,12 +294,12 @@ String _debugLogModeSerialize(DebugLogMode value) { DebugLogMode _debugLogModeDeserialize(const String& value) { switch (value.toInt()) { case 0: - return DebugLogMode::DISABLED; + return DebugLogMode::Disabled; case 2: - return DebugLogMode::SKIP_BOOT; + return DebugLogMode::SkipBoot; case 1: default: - return DebugLogMode::ENABLED; + return DebugLogMode::Enabled; } } @@ -311,15 +311,15 @@ void debugConfigureBoot() { const auto mode = getSetting("dbgLogMode", DEBUG_LOG_MODE); switch (mode) { - case DebugLogMode::SKIP_BOOT: + case DebugLogMode::SkipBoot: schedule_function([]() { _debug_enabled = true; }); // fall through - case DebugLogMode::DISABLED: + case DebugLogMode::Disabled: _debug_enabled = false; break; - case DebugLogMode::ENABLED: + case DebugLogMode::Enabled: _debug_enabled = true; break; }