dashboard: force overview repaint after battery detail
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
static const char *DASHBOARD_VERSION = "0.1.96-hide-battery-overlay";
|
static const char *DASHBOARD_VERSION = "0.1.97-force-overview-repaint";
|
||||||
|
|
||||||
// Update these if your Cargo ESP AP credentials are different.
|
// Update these if your Cargo ESP AP credentials are different.
|
||||||
//static const char *CARGO_WIFI_SSID = "OverlandController";
|
//static const char *CARGO_WIFI_SSID = "OverlandController";
|
||||||
|
|||||||
@@ -673,6 +673,7 @@ static void close_battery_detail_screen()
|
|||||||
}
|
}
|
||||||
|
|
||||||
current_dashboard_screen = SCREEN_OVERVIEW;
|
current_dashboard_screen = SCREEN_OVERVIEW;
|
||||||
|
invalidate_overview_widget_cache();
|
||||||
refresh_dashboard_widgets();
|
refresh_dashboard_widgets();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1453,6 +1454,24 @@ static void parse_status_json(const String &body)
|
|||||||
update_battery_detail_widgets();
|
update_battery_detail_widgets();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void invalidate_overview_widget_cache()
|
||||||
|
{
|
||||||
|
last_battery_current_text = "__force__";
|
||||||
|
last_battery_estimate_text = "__force__";
|
||||||
|
last_battery_soc_text = "__force__";
|
||||||
|
last_system_status_text = "__force__";
|
||||||
|
last_outside_status_temp_text = "__force__";
|
||||||
|
|
||||||
|
for (int i = 0; i < 2; i++) {
|
||||||
|
last_temp_tile_value_text[i] = "__force__";
|
||||||
|
last_temp_tile_name_text[i] = "__force__";
|
||||||
|
last_temp_tile_alert[i] = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
last_battery_card_alert = false;
|
||||||
|
last_cargo_api_ok = !last_cargo_api_ok;
|
||||||
|
}
|
||||||
|
|
||||||
static void refresh_dashboard_widgets()
|
static void refresh_dashboard_widgets()
|
||||||
{
|
{
|
||||||
update_overview_widgets();
|
update_overview_widgets();
|
||||||
|
|||||||
Reference in New Issue
Block a user