Merge branch 'develop' into notify-battery-level
# Conflicts: # src/displayapp/screens/BatteryInfo.cpp
This commit is contained in:
@@ -95,16 +95,16 @@ void BatteryInfo::UpdateScreen() {
|
||||
|
||||
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);
|
||||
|
Reference in New Issue
Block a user