Skip to content

Commit b31b242

Browse files
committed
Use percentage instead of IsFull
1 parent ac2ccae commit b31b242

2 files changed

Lines changed: 1 addition & 5 deletions

File tree

src/components/battery/BatteryController.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ namespace Pinetime {
3232
return isPowerPresent;
3333
}
3434

35-
bool IsFull() const {
36-
return isFull;
37-
}
38-
3935
private:
4036
static Battery* instance;
4137
nrf_saadc_value_t saadc_value;

src/displayapp/screens/BatteryInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ void BatteryInfo::Refresh() {
6363
if (batteryController.IsCharging()) {
6464
lv_obj_set_style_local_bg_color(charging_bar, LV_BAR_PART_INDIC, LV_STATE_DEFAULT, LV_COLOR_RED);
6565
lv_label_set_text_static(status, "Charging");
66-
} else if (batteryController.IsFull()) {
66+
} else if (batteryPercent == 100) {
6767
lv_obj_set_style_local_bg_color(charging_bar, LV_BAR_PART_INDIC, LV_STATE_DEFAULT, LV_COLOR_BLUE);
6868
lv_label_set_text_static(status, "Fully charged");
6969
} else if (batteryPercent < 10) {

0 commit comments

Comments
 (0)