Repeater (SenseCAP Solar): battery thresholds settable at runtime, and a cutoff that switches a running node off before the cell runs flat

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
tthandClaude Opus 5.5 committed 2026-11-23 13:22:24 +01:00
1 parent b01a26e859
commit d09576090b
10 files changed
+392 -19

No files matched your search

+8
View File
@@ -71,6 +71,14 @@ public:
#ifdef PWRMGT_LPCOMP_AIN
bool getWakeLpcompSupported() const override { return true; }
#endif
// CUSTOM (TeTeHacko): entry points for runtime battery thresholds
// (PWRMGT_RUNTIME, helpers/LowVoltageGuard.h via NodeMaintenance). The boot
// check reads only voltage_bootlock; the wake is armed by initiateShutdown().
bool bootVoltageCheck(uint16_t bootlock_mv) {
PowerMgtConfig c = { 0, 0, bootlock_mv };
return checkBootVoltage(&c);
}
void lowVoltageShutdown() { initiateShutdown(SHUTDOWN_REASON_LOW_VOLTAGE); }
#endif
};