mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-23 03:00:56 +00:00
- implement shutdown (deep sleep forever) on ESP32
- Clean up shutdown and delayed shutdown code conditionals. - clean up inputbroker includes
This commit is contained in:
@@ -18,31 +18,16 @@ void powerCommandsCheck()
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(ARCH_NRF52) || defined(HAS_PMU)
|
||||
#if defined(ARCH_ESP32) || defined(ARCH_NRF52)
|
||||
if (shutdownAtMsec) {
|
||||
screen->startShutdownScreen();
|
||||
playBeep();
|
||||
#ifdef PIN_LED1
|
||||
ledOff(PIN_LED1);
|
||||
#endif
|
||||
#ifdef PIN_LED2
|
||||
ledOff(PIN_LED2);
|
||||
#endif
|
||||
#ifdef PIN_LED3
|
||||
ledOff(PIN_LED3);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
if (shutdownAtMsec && millis() > shutdownAtMsec) {
|
||||
LOG_INFO("Shutting down from admin command\n");
|
||||
#ifdef HAS_PMU
|
||||
if (pmu_found == true) {
|
||||
playShutdownMelody();
|
||||
power->shutdown();
|
||||
}
|
||||
#elif defined(ARCH_NRF52)
|
||||
playShutdownMelody();
|
||||
#if defined(ARCH_NRF52) || defined(ARCH_ESP32)
|
||||
power->shutdown();
|
||||
#else
|
||||
LOG_WARN("FIXME implement shutdown for this platform");
|
||||
|
||||
Reference in New Issue
Block a user