From 56b0e49bada126a24130bd7a4e130cf8fd74a33f Mon Sep 17 00:00:00 2001 From: fvanroie <15969459+fvanroie@users.noreply.github.com> Date: Sat, 20 Mar 2021 14:38:36 +0100 Subject: [PATCH] Fix teleperiod setting --- src/log/hasp_debug.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/log/hasp_debug.cpp b/src/log/hasp_debug.cpp index d95bd3a1..f30989fc 100644 --- a/src/log/hasp_debug.cpp +++ b/src/log/hasp_debug.cpp @@ -95,7 +95,7 @@ extern bool debugAnsiCodes; ConsoleInput debugConsole(&Serial, HASP_CONSOLE_BUFFER); unsigned long debugLastMillis = 0; -uint16_t debugTelePeriod = 300; +extern dispatch_conf_t dispatch_setings; // #if HASP_USE_SYSLOG > 0 // void syslogSend(uint8_t priority, const char * debugText) @@ -158,8 +158,8 @@ bool debugGetConfig(const JsonObject& settings) if(debugSerialBaud != settings[FPSTR(FP_CONFIG_BAUD)].as()) changed = true; settings[FPSTR(FP_CONFIG_BAUD)] = debugSerialBaud; - if(debugTelePeriod != settings[FPSTR(FP_DEBUG_TELEPERIOD)].as()) changed = true; - settings[FPSTR(FP_DEBUG_TELEPERIOD)] = debugTelePeriod; + if(dispatch_setings.teleperiod != settings[FPSTR(FP_DEBUG_TELEPERIOD)].as()) changed = true; + settings[FPSTR(FP_DEBUG_TELEPERIOD)] = dispatch_setings.teleperiod; #if HASP_USE_SYSLOG > 0 if(strcmp(debugSyslogHost, settings[FPSTR(FP_CONFIG_HOST)].as().c_str()) != 0) changed = true; @@ -196,7 +196,7 @@ bool debugSetConfig(const JsonObject& settings) changed |= configSet(debugSerialBaud, settings[FPSTR(FP_CONFIG_BAUD)], F("debugSerialBaud")); /* Teleperiod Settings*/ - changed |= configSet(debugTelePeriod, settings[FPSTR(FP_DEBUG_TELEPERIOD)], F("debugTelePeriod")); + changed |= configSet(dispatch_setings.teleperiod, settings[FPSTR(FP_DEBUG_TELEPERIOD)], F("debugTelePeriod")); /* Syslog Settings*/ #if HASP_USE_SYSLOG > 0 @@ -353,6 +353,7 @@ void debugLoop(void) } } while(keypress != 0); } + void printLocalTime() { char buffer[128];