mirror of
https://github.com/meshtastic/firmware.git
synced 2025-07-30 02:15:41 +00:00
use events to stay in idle state
This commit is contained in:
parent
1d2a5c0692
commit
31c1d935f2
@ -130,7 +130,7 @@ static void lsIdle()
|
||||
|
||||
case ESP_SLEEP_WAKEUP_EXT0:
|
||||
LOG_DEBUG("Wake cause ESP_SLEEP_WAKEUP_EXT0");
|
||||
powerFSM.trigger(EVENT_LORA_INTERRUPT);
|
||||
powerFSM.trigger(EVENT_RADIO_INTERRUPT);
|
||||
return;
|
||||
|
||||
case ESP_SLEEP_WAKEUP_EXT1:
|
||||
@ -383,10 +383,12 @@ void PowerFSM_setup()
|
||||
// when we leave, go to ON (which might not be the correct state if we have power connected, we will fix that in onEnter)
|
||||
powerFSM.add_transition(&stateSERIAL, &stateON, EVENT_SERIAL_DISCONNECTED, NULL, "Serial disconnect");
|
||||
|
||||
powerFSM.add_transition(&stateLS, stateIDLE, EVENT_LORA_INTERRUPT, NULL, "LoRa interrupt");
|
||||
powerFSM.add_transition(&stateLS, stateIDLE, EVENT_WAKE_TIMER, NULL, "Wake timer");
|
||||
powerFSM.add_transition(&stateLS, stateIDLE, EVENT_RADIO_INTERRUPT, NULL, "Radio interrupt");
|
||||
|
||||
powerFSM.add_transition(stateIDLE, stateIDLE, EVENT_WAKE_TIMER, NULL, "Wake timer");
|
||||
powerFSM.add_transition(stateIDLE, stateIDLE, EVENT_WEB_REQUEST, NULL, "Web request");
|
||||
powerFSM.add_transition(stateIDLE, stateIDLE, EVENT_RADIO_INTERRUPT, NULL, "Radio interrupt");
|
||||
|
||||
#ifdef USE_EINK
|
||||
// Allow E-Ink devices to suppress the screensaver, if screen timeout set to 0
|
||||
|
@ -21,7 +21,7 @@
|
||||
#define EVENT_FIRMWARE_UPDATE 15 // We just received a new firmware update packet from the phone
|
||||
#define EVENT_SHUTDOWN 16 // force a full shutdown now (not just sleep)
|
||||
#define EVENT_INPUT 17 // input broker wants something, we need to wake up and enable screen
|
||||
#define EVENT_LORA_INTERRUPT 18
|
||||
#define EVENT_RADIO_INTERRUPT 18
|
||||
#define EVENT_WEB_REQUEST 19
|
||||
|
||||
#if defined(ARCH_ESP32) && !defined(WAKE_TIME_MS)
|
||||
|
@ -246,7 +246,7 @@ currently active.
|
||||
*/
|
||||
void RadioLibInterface::onNotify(uint32_t notification)
|
||||
{
|
||||
powerFSM.trigger(EVENT_LORA_INTERRUPT);
|
||||
powerFSM.trigger(EVENT_RADIO_INTERRUPT);
|
||||
|
||||
switch (notification) {
|
||||
case ISR_TX:
|
||||
|
Loading…
Reference in New Issue
Block a user