From 748e31421dddf509339dd01ece80e3a7ac76e04d Mon Sep 17 00:00:00 2001 From: kieranc Date: Sun, 11 Jul 2021 17:48:16 +0200 Subject: [PATCH] Modify status text in BatteryInfo so it fits on screen (#437) * Modify status text in BatteryInfo so it fits on screen --- src/displayapp/screens/BatteryInfo.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/displayapp/screens/BatteryInfo.cpp b/src/displayapp/screens/BatteryInfo.cpp index 87c8b4bb..7e055762 100644 --- a/src/displayapp/screens/BatteryInfo.cpp +++ b/src/displayapp/screens/BatteryInfo.cpp @@ -102,16 +102,16 @@ void BatteryInfo::UpdateScreen() { if (batteryPercent >= 0) { if (batteryController.IsCharging() and batteryPercent < 100) { lv_obj_set_style_local_bg_color(charging_bar, LV_BAR_PART_INDIC, LV_STATE_DEFAULT, LV_COLOR_RED); - lv_label_set_text_static(status, "Battery charging"); + lv_label_set_text_static(status, "Charging"); } 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, "Battery is fully charged"); + lv_label_set_text_static(status, "Fully charged"); } else if (batteryPercent < 10) { 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 is low"); + lv_label_set_text_static(status, "Battery low"); } else { lv_obj_set_style_local_bg_color(charging_bar, LV_BAR_PART_INDIC, LV_STATE_DEFAULT, LV_COLOR_GREEN); - lv_label_set_text_static(status, "Battery discharging"); + lv_label_set_text_static(status, "Discharging"); } lv_label_set_text_fmt(percent, "%02i%%", batteryPercent);