diff --git a/firmware/esp32-s3-dashboard/dashboard_config.h b/firmware/esp32-s3-dashboard/dashboard_config.h index 7224909..fa57f57 100644 --- a/firmware/esp32-s3-dashboard/dashboard_config.h +++ b/firmware/esp32-s3-dashboard/dashboard_config.h @@ -1,6 +1,6 @@ #pragma once -static const char *DASHBOARD_VERSION = "0.1.119-temp-alert-debug"; +static const char *DASHBOARD_VERSION = "0.1.120-temp-alert-style-real-fix"; // Update these if your Cargo ESP AP credentials are different. //static const char *CARGO_WIFI_SSID = "OverlandController"; diff --git a/firmware/esp32-s3-dashboard/esp32-s3-dashboard.ino b/firmware/esp32-s3-dashboard/esp32-s3-dashboard.ino index bc2bbcd..c175814 100644 --- a/firmware/esp32-s3-dashboard/esp32-s3-dashboard.ino +++ b/firmware/esp32-s3-dashboard/esp32-s3-dashboard.ino @@ -1288,14 +1288,10 @@ static void update_temp_tile_alert_style(int index, bool alert) return; } - if (last_temp_tile_alert[index] == alert) { - return; - } - + // Always apply the visual style. The cache can get out of sync when pages + // are hidden/shown, so it must not prevent repainting the tile. last_temp_tile_alert[index] = alert; - lvgl_port_lock(-1); - if (alert) { lv_obj_set_style_bg_color(temp_tile_objs[index], lv_color_hex(0x7A271A), 0); lv_obj_set_style_border_color(temp_tile_objs[index], lv_color_hex(0xF97066), 0); @@ -1305,11 +1301,8 @@ static void update_temp_tile_alert_style(int index, bool alert) lv_obj_set_style_border_color(temp_tile_objs[index], lv_color_hex(0x2F3A46), 0); lv_obj_set_style_border_width(temp_tile_objs[index], 2, 0); } - - lvgl_port_unlock(); } - static void update_battery_card_alert_style(bool alert) { if (battery_card_obj == nullptr) { @@ -1465,15 +1458,6 @@ static void parse_status_json(const String &body) float temp_f = (float)(temp["temperature_f"] | 0.0); bool high_alert = temp["high_alert"] | false; - - Serial.printf( - "TEMP DEBUG: name=%s group=%s temp=%.1f high_alert=%d\n", - temp["name"] | "unknown", - temp["group"] | "", - temp_f, - high_alert ? 1 : 0 - ); - if (weather) { outside_status = "OUT "; outside_status += String((int)round(temp_f));