Fix nagging bool linter warnings (#1491)

This commit is contained in:
Ben Meadors
2022-06-04 07:28:58 -05:00
committed by GitHub
parent 3df5ec0b11
commit 4ab831c103
3 changed files with 4 additions and 12 deletions

View File

@@ -45,9 +45,8 @@ SerialConsole::SerialConsole() : StreamAPI(&Port), RedirectablePrint(&Port)
bool SerialConsole::checkIsConnected()
{
uint32_t now = millis();
return (now - lastContactMsec) < config.power.phone_timeout_secs
? config.power.phone_timeout_secs
: default_phone_timeout_secs * 1000UL;
uint32_t timeout = (config.power.phone_timeout_secs > 0 ? config.power.phone_timeout_secs : default_phone_timeout_secs )* 1000UL;
return (now - lastContactMsec) < timeout;
}
/**