Add configurable nRF52 battery profiles with LiFePO4 cutoff

This commit is contained in:
mikecarper committed 2026-09-30 01:11:10 -07:00
1 parent 5d19a0a731
commit 2d78b8f06c
31 files changed
+692 -32

No files matched your search

+12
View File
@@ -21,6 +21,9 @@
#include <helpers/StaticPoolPacketManager.h>
#include <helpers/SimpleMeshTables.h>
#include <helpers/IdentityStore.h>
#if defined(NRF52_POWER_MANAGEMENT)
#include <helpers/NRF52VoltagePolicy.h>
#endif
#if defined(ESP32_PLATFORM)
#include <helpers/ESP32TrueRandom.h>
#endif
@@ -464,6 +467,14 @@ public:
}
void handleCommand(const char* command) {
#if defined(NRF52_POWER_MANAGEMENT)
char voltage_reply[160];
if (mesh::power::handleVoltagePolicyCommand(command, voltage_reply,
sizeof(voltage_reply))) {
Serial.println(voltage_reply);
return;
}
#endif
char profile_reply[160];
if (_radio_profiles.handle(command, profile_reply, sizeof(profile_reply))) {
Serial.println(profile_reply); return;
@@ -785,6 +796,7 @@ void setup() {
void loop() {
#if defined(NRF52_PLATFORM)
board.feedWatchdog();
board.loop();
#endif
the_mesh.loop();
rtc_clock.tick();