Enhance battery detection and configuration handling (#3197)

* indicate batt changed event
* added sleep config, and use it.
* reinit if new batt detected.
* more detect
* repl batt setting
* disabled some things
* copilot fixes
This commit is contained in:
Totoo
2026-06-11 10:52:20 +02:00
committed by GitHub
parent 9042d1c433
commit 6b5955e0b5
16 changed files with 154 additions and 67 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ void I2cDev_ADS1110::update() {
uint16_t voltage = readVoltage();
uint8_t batteryPercentage = battery::BatteryManagement::calc_percent_voltage(voltage);
// send local message
BatteryStateMessage msg{1, batteryPercentage, false, voltage};
BatteryStateMessage msg{1, batteryPercentage, false, voltage, false};
EventDispatcher::send_message(msg);
}