mirror of
https://github.com/markqvist/RNode_Firmware.git
synced 2025-11-26 17:56:26 -05:00
Reworked battery charge state detection for boards with only ADC-based PMU. Improved battery charge status info on display.
This commit is contained in:
parent
427c06bf81
commit
59c0a60b33
3 changed files with 53 additions and 23 deletions
|
|
@ -574,6 +574,9 @@ void draw_battery_bars(int px, int py) {
|
|||
}
|
||||
|
||||
if (battery_state == BATTERY_STATE_CHARGING && !disable_charge_status) {
|
||||
float battery_prog = battery_percent;
|
||||
if (battery_prog > 85) { battery_prog = 84; }
|
||||
if (charge_tick < battery_prog ) { charge_tick = battery_prog; }
|
||||
battery_value = charge_tick;
|
||||
charge_tick += 3;
|
||||
if (charge_tick > 100) charge_tick = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue