|
@ -281,12 +281,12 @@ void debugSetup() { |
|
|
|
|
|
|
|
|
String _debugLogModeSerialize(DebugLogMode value) { |
|
|
String _debugLogModeSerialize(DebugLogMode value) { |
|
|
switch (value) { |
|
|
switch (value) { |
|
|
case DebugLogMode::DISABLED: |
|
|
|
|
|
|
|
|
case DebugLogMode::Disabled: |
|
|
return "0"; |
|
|
return "0"; |
|
|
case DebugLogMode::SKIP_BOOT: |
|
|
|
|
|
|
|
|
case DebugLogMode::SkipBoot: |
|
|
return "2"; |
|
|
return "2"; |
|
|
default: |
|
|
default: |
|
|
case DebugLogMode::ENABLED: |
|
|
|
|
|
|
|
|
case DebugLogMode::Enabled: |
|
|
return "1"; |
|
|
return "1"; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -294,12 +294,12 @@ String _debugLogModeSerialize(DebugLogMode value) { |
|
|
DebugLogMode _debugLogModeDeserialize(const String& value) { |
|
|
DebugLogMode _debugLogModeDeserialize(const String& value) { |
|
|
switch (value.toInt()) { |
|
|
switch (value.toInt()) { |
|
|
case 0: |
|
|
case 0: |
|
|
return DebugLogMode::DISABLED; |
|
|
|
|
|
|
|
|
return DebugLogMode::Disabled; |
|
|
case 2: |
|
|
case 2: |
|
|
return DebugLogMode::SKIP_BOOT; |
|
|
|
|
|
|
|
|
return DebugLogMode::SkipBoot; |
|
|
case 1: |
|
|
case 1: |
|
|
default: |
|
|
default: |
|
|
return DebugLogMode::ENABLED; |
|
|
|
|
|
|
|
|
return DebugLogMode::Enabled; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -311,15 +311,15 @@ void debugConfigureBoot() { |
|
|
|
|
|
|
|
|
const auto mode = getSetting<DebugLogMode, _debugLogModeDeserialize>("dbgLogMode", DEBUG_LOG_MODE); |
|
|
const auto mode = getSetting<DebugLogMode, _debugLogModeDeserialize>("dbgLogMode", DEBUG_LOG_MODE); |
|
|
switch (mode) { |
|
|
switch (mode) { |
|
|
case DebugLogMode::SKIP_BOOT: |
|
|
|
|
|
|
|
|
case DebugLogMode::SkipBoot: |
|
|
schedule_function([]() { |
|
|
schedule_function([]() { |
|
|
_debug_enabled = true; |
|
|
_debug_enabled = true; |
|
|
}); |
|
|
}); |
|
|
// fall through
|
|
|
// fall through
|
|
|
case DebugLogMode::DISABLED: |
|
|
|
|
|
|
|
|
case DebugLogMode::Disabled: |
|
|
_debug_enabled = false; |
|
|
_debug_enabled = false; |
|
|
break; |
|
|
break; |
|
|
case DebugLogMode::ENABLED: |
|
|
|
|
|
|
|
|
case DebugLogMode::Enabled: |
|
|
_debug_enabled = true; |
|
|
_debug_enabled = true; |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|