From cad58f190f18bc4717d7c1b78e8a5497d5220d9e Mon Sep 17 00:00:00 2001 From: minacode Date: Sun, 9 Oct 2022 21:58:57 +0200 Subject: added message, changed UI --- src/displayapp/screens/BatteryInfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/displayapp/screens/BatteryInfo.cpp') diff --git a/src/displayapp/screens/BatteryInfo.cpp b/src/displayapp/screens/BatteryInfo.cpp index 9febda61..87d1f2e1 100644 --- a/src/displayapp/screens/BatteryInfo.cpp +++ b/src/displayapp/screens/BatteryInfo.cpp @@ -59,7 +59,7 @@ void BatteryInfo::Refresh() { } else if (batteryPercent == 100) { lv_obj_set_style_local_bg_color(charging_bar, LV_BAR_PART_INDIC, LV_STATE_DEFAULT, LV_COLOR_BLUE); lv_label_set_text_static(status, "Fully charged"); - } else if (batteryPercent < 10) { + } else if (batteryController.BatteryIsLow()) { lv_obj_set_style_local_bg_color(charging_bar, LV_BAR_PART_INDIC, LV_STATE_DEFAULT, LV_COLOR_YELLOW); lv_label_set_text_static(status, "Battery low"); } else { -- cgit v1.2.3-70-g09d2