Add an hourly emergency battery sleep schedule for infrastructure nodes

This commit is contained in:
mikecarper committed 2026-10-28 02:06:58 -07:00
1 parent 744692fb93
commit 0c7dec9f19
30 files changed
+2020 -33

No files matched your search

+15
View File
@@ -24,6 +24,7 @@
#include <helpers/HostKiss.h>
#include <helpers/MorseLoopPolicy.h>
#include <helpers/PowerManagementUtils.h>
#include <helpers/EmergencyPowerRuntime.h>
#if defined(NRF52_PLATFORM) && MESH_ENABLE_SENSOR_TRACKER
#include <utility/SoftwareTimer.h>
static SoftwareTimer tracker_wake_timer;
@@ -412,6 +413,18 @@ void loop() {
mesh::power::serviceRegulatorSettings();
board.loop(); // let the board feed its watchdog, run periodic housekeeping
#if MESH_ENABLE_EMERGENCY_POWER
static mesh::power::EmergencyPowerRuntime emergency_power;
#if defined(ESP32_PLATFORM)
board.servicePowerTestControls();
#endif
rtc_clock.tick();
#ifdef HAS_EXTERNAL_WATCHDOG
external_watchdog.loop();
#endif
if (emergency_power.service(the_mesh, radio_driver, board,
the_mesh.getPowerCLI(), command[0], the_mesh.emergencyPowerBusy())) return;
#endif
the_mesh.loop();
const bool morse_timing = mesh::morseTimingActive(&radio_driver);
#if defined(USE_LR2021)
@@ -442,7 +455,9 @@ void loop() {
#endif
#if defined(ESP32_PLATFORM)
#if !MESH_ENABLE_EMERGENCY_POWER
board.servicePowerTestControls();
#endif
mesh::esp32::serviceCpuFrequencyPolicy(board, the_mesh.getNodePrefs()->cpu_freq_mhz,
the_mesh.getNodePrefs()->powersaving_enabled != 0, millis(), false, the_mesh.isDualRadioActive());
#endif