mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-14 21:17:43 +00:00
Learn ic fix (#2253)
* WIP * Fixed merge * Added test code * WIP * Clean up * add reset learned params * ui fix * ui fix2 * Updated func * Fixed english * WIP * WIP testing * Added new debug app * Got new app for debug * Got new app for debug * Got one full page showing * Got app working with all reg * Got app working with all reg * Got full hex showing * Fixed dp * Fixed dp * Moved entities * Enabled apps again * SHow battery debug if ic * WIP * Refactored further * WIP * Refactor and clean up * Refactor and clean up * fix warning, add tte/ttf, add cycles counter. * wip * morse tx to ext app * fix morse crash * fix ui * Updated wording * WIP * WIP * Updated to display hours and minutes --------- Co-authored-by: HTotoo <ttotoo@gmail.com>
This commit is contained in:
@@ -44,6 +44,8 @@ class BatteryManagement {
|
||||
BATT_VALID_VOLTAGE = 1,
|
||||
BATT_VALID_CURRENT = 2,
|
||||
BATT_VALID_PERCENT = 4,
|
||||
BATT_VALID_CYCLES = 8,
|
||||
BATT_VALID_TTEF = 16,
|
||||
};
|
||||
static void init(bool override = false);
|
||||
static void detect();
|
||||
@@ -56,6 +58,10 @@ class BatteryManagement {
|
||||
static bool write_register(const uint8_t reg, const uint16_t value);
|
||||
static void set_calc_override(bool override);
|
||||
static uint8_t calc_percent_voltage(uint16_t); // calculates battery percentage from the voltage
|
||||
static bool reset_learned(); // resets the ic's learned parameters
|
||||
static uint16_t get_cycles();
|
||||
static float get_tte();
|
||||
static float get_ttf();
|
||||
|
||||
private:
|
||||
static void create_thread();
|
||||
|
Reference in New Issue
Block a user