mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2026-09-12 09:39:30 +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:
@@ -46,10 +46,11 @@ class BatteryManagement {
|
||||
static void set_calc_override(bool override);
|
||||
static uint8_t calc_percent_voltage(uint16_t); // calculates battery percentage from the voltage
|
||||
static bool calcOverride; // if set to true, it'll override the battery percent calculation based on current voltage.
|
||||
static void getBatteryInfo(uint8_t& valid_mask, uint8_t& percent, uint16_t& voltage, int32_t& current);
|
||||
static void getBatteryInfo(uint8_t& valid_mask, uint8_t& percent, uint16_t& voltage, int32_t& current, bool& battMayChanged);
|
||||
static uint16_t get_cycles();
|
||||
static float get_tte();
|
||||
static float get_ttf();
|
||||
static void reset_changed_flag();
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user