From bacc1b1dad83611c7f044cfa7d6f42b797c1dcb4 Mon Sep 17 00:00:00 2001 From: Jm Date: Tue, 22 Dec 2020 22:37:34 -0800 Subject: [PATCH] #581 - Quiet a compile time warning I introduced. --- src/PowerFSM.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PowerFSM.cpp b/src/PowerFSM.cpp index be1ace0d..20ad6625 100644 --- a/src/PowerFSM.cpp +++ b/src/PowerFSM.cpp @@ -179,7 +179,7 @@ void PowerFSM_setup() 1) If we're powered up and there's no battery, we must be getting power externally. 2) If we detect USB power from the power management chip, we must be getting power externally. */ - bool hasPower = (powerStatus && !powerStatus->getHasBattery()) || !isLowPower && powerStatus && powerStatus->getHasUSB(); + bool hasPower = (powerStatus && !powerStatus->getHasBattery()) || (!isLowPower && powerStatus && powerStatus->getHasUSB()); bool isRouter = radioConfig.preferences.is_router; DEBUG_MSG("PowerFSM init, USB power=%d\n", hasPower); powerFSM.add_timed_transition(&stateBOOT, hasPower ? &statePOWER : &stateON, 3 * 1000, NULL, "boot timeout");