mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-22 02:32:23 +00:00
Finish config transition
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#include "configuration.h"
|
||||
#include "SerialConsole.h"
|
||||
#include "NodeDB.h"
|
||||
#include "PowerFSM.h"
|
||||
#include "configuration.h"
|
||||
|
||||
#define Port Serial
|
||||
|
||||
@@ -45,7 +45,9 @@ SerialConsole::SerialConsole() : StreamAPI(&Port), RedirectablePrint(&Port)
|
||||
bool SerialConsole::checkIsConnected()
|
||||
{
|
||||
uint32_t now = millis();
|
||||
return (now - lastContactMsec) < getPref_phone_timeout_secs() * 1000UL;
|
||||
return (now - lastContactMsec) < config.payloadVariant.power.phone_timeout_secs
|
||||
? config.payloadVariant.power.phone_timeout_secs
|
||||
: default_phone_timeout_secs * 1000UL;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -55,10 +57,9 @@ bool SerialConsole::checkIsConnected()
|
||||
bool SerialConsole::handleToRadio(const uint8_t *buf, size_t len)
|
||||
{
|
||||
// Turn off debug serial printing once the API is activated, because other threads could print and corrupt packets
|
||||
if (!radioConfig.preferences.debug_log_enabled)
|
||||
if (!config.payloadVariant.device.debug_log_enabled)
|
||||
setDestination(&noopPrint);
|
||||
canWrite = true;
|
||||
|
||||
return StreamAPI::handleToRadio(buf, len);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user