dashboard: repair battery update region

This commit is contained in:
2026-06-10 02:20:03 -06:00
parent 8047db6c02
commit 6182feeec2
2 changed files with 2 additions and 24 deletions
@@ -1,6 +1,6 @@
#pragma once
static const char *DASHBOARD_VERSION = "0.1.21-fix-battery-widget-update";
static const char *DASHBOARD_VERSION = "0.1.22-repair-battery-update";
// Update these if your Cargo ESP AP credentials are different.
static const char *CARGO_WIFI_SSID = "OverlandController";
@@ -459,6 +459,7 @@ static void update_system_status_label()
}
static void update_overview_widgets()
{
String current_text = "Idle";
@@ -499,29 +500,6 @@ static void update_overview_widgets()
}
}
String soc_text;
soc_text += status_model.soc >= 0 ? String(status_model.soc) : "--";
soc_text += "%";
update_battery_soc_gauge();
set_label_text_if_changed(battery_soc_label, last_battery_soc_text, soc_text);
update_battery_current_label(current_text, status_model.current);
if (battery_estimate_label != nullptr) {
set_label_text_if_changed(battery_estimate_label, last_battery_estimate_text, estimate_text);
lvgl_port_lock(-1);
if (estimate_text.length() == 0) {
lv_obj_add_flag(battery_estimate_label, LV_OBJ_FLAG_HIDDEN);
} else {
lv_obj_clear_flag(battery_estimate_label, LV_OBJ_FLAG_HIDDEN);
}
lvgl_port_unlock();
}
set_label_text_if_changed(system_status_label, last_system_status_text, last_system_status_text);
}
static void parse_status_json(const String &body)
{
DynamicJsonDocument doc(16000);