mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-19 17:22:59 +00:00
fix POWER state entry/exit based on loss of USB power (tx @mc-hamster)
This commit is contained in:
@@ -128,7 +128,8 @@ class PowerFSMThread : public OSThread
|
||||
|
||||
/// If we are in power state we force the CPU to wake every 10ms to check for serial characters (we don't yet wake
|
||||
/// cpu for serial rx - FIXME)
|
||||
canSleep = (powerFSM.getState() != &statePOWER);
|
||||
auto state = powerFSM.getState();
|
||||
canSleep = (state != &statePOWER) && (state != &stateSERIAL);
|
||||
|
||||
return 10;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user