mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2026-08-27 09:59: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:
@@ -238,7 +238,8 @@ void EventDispatcher::charge_deep_sleep(const bool sleep) {
|
||||
// --- Battery Status Check (I2C) ---
|
||||
detect = battery::BatteryManagement::isDetected();
|
||||
if (detect) {
|
||||
battery::BatteryManagement::getBatteryInfo(valid_mask, percent, voltage, current);
|
||||
bool dummy;
|
||||
battery::BatteryManagement::getBatteryInfo(valid_mask, percent, voltage, current, dummy);
|
||||
|
||||
bool is_full = (valid_mask == 31 && percent == 100 && current <= 10) ||
|
||||
(valid_mask == 1 && percent == 100);
|
||||
|
||||
Reference in New Issue
Block a user