mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2026-08-22 07:29:03 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user