mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2026-09-11 09:09:29 +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:
@@ -1610,17 +1610,20 @@ class BatteryStateMessage : public Message {
|
||||
uint8_t valid_mask,
|
||||
uint8_t percent,
|
||||
bool on_charger,
|
||||
uint16_t voltage)
|
||||
uint16_t voltage,
|
||||
bool battMayChanged)
|
||||
: Message{ID::BatteryStateData},
|
||||
valid_mask{valid_mask},
|
||||
percent{percent},
|
||||
on_charger{on_charger},
|
||||
voltage{voltage} {
|
||||
voltage{voltage},
|
||||
battMayChanged{battMayChanged} {
|
||||
}
|
||||
uint8_t valid_mask = 0;
|
||||
uint8_t percent = 0;
|
||||
bool on_charger = false;
|
||||
uint16_t voltage = 0; // mV
|
||||
bool battMayChanged = false;
|
||||
};
|
||||
|
||||
class ProtoViewDataMessage : public Message {
|
||||
|
||||
Reference in New Issue
Block a user