mirror of
https://github.com/meshtastic/firmware.git
synced 2025-07-31 02:45:41 +00:00
fix failing build for rak4631_eth_gw
This commit is contained in:
parent
f725505f54
commit
fb4418b952
@ -253,8 +253,15 @@ static int32_t ledBlinker()
|
|||||||
|
|
||||||
ledBlink.set(ledOn);
|
ledBlink.set(ledOn);
|
||||||
|
|
||||||
|
// we don't have much control over timing when light-sleeping, so let's ensure we don't keep LED on for too long
|
||||||
|
#if MESHTASTIC_EXCLUDE_POWER_FSM
|
||||||
|
bool isSleeping = false;
|
||||||
|
#else
|
||||||
|
bool isSleeping = powerFSM.getState() == &stateLS;
|
||||||
|
#endif
|
||||||
|
|
||||||
// have a very sparse duty cycle of LED being on, unless charging, then blink 0.5Hz square wave rate to indicate that
|
// have a very sparse duty cycle of LED being on, unless charging, then blink 0.5Hz square wave rate to indicate that
|
||||||
return (powerStatus->getIsCharging() && powerFSM.getState() != &stateLS) ? 1000 : (ledOn ? 1 : 1000);
|
return (powerStatus->getIsCharging() && !isSleeping) ? 1000 : (ledOn ? 1 : 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t timeLastPowered = 0;
|
uint32_t timeLastPowered = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user