From ff4f84a219b375bc1f3f7b29340318b4fc4e73ea Mon Sep 17 00:00:00 2001 From: nick Date: Wed, 10 Jun 2026 02:01:44 -0600 Subject: [PATCH] dashboard: clean up battery gauge spacing --- .../esp32-s3-dashboard/dashboard_config.h | 2 +- .../esp32-s3-dashboard/esp32-s3-dashboard.ino | 22 ++++++++++--------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/firmware/esp32-s3-dashboard/dashboard_config.h b/firmware/esp32-s3-dashboard/dashboard_config.h index 473a13b..7957ede 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.15-battery-center-estimate"; +static const char *DASHBOARD_VERSION = "0.1.16-battery-gauge-cleanup"; // 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 bd97e31..ff06269 100644 --- a/firmware/esp32-s3-dashboard/esp32-s3-dashboard.ino +++ b/firmware/esp32-s3-dashboard/esp32-s3-dashboard.ino @@ -200,15 +200,16 @@ static void update_battery_soc_gauge() lv_arc_set_value(battery_soc_arc, soc); lv_arc_set_angles(battery_soc_arc, 0, end_angle); + lv_obj_set_style_arc_color( + battery_soc_arc, + charging ? lv_color_hex(0x32D583) : lv_color_hex(0x84CAFF), + LV_PART_INDICATOR + ); lv_arc_set_value(battery_charge_pulse_arc, soc); lv_arc_set_angles(battery_charge_pulse_arc, 0, end_angle); - if (charging) { - lv_obj_clear_flag(battery_charge_pulse_arc, LV_OBJ_FLAG_HIDDEN); - } else { - lv_obj_add_flag(battery_charge_pulse_arc, LV_OBJ_FLAG_HIDDEN); - } + lv_obj_add_flag(battery_charge_pulse_arc, LV_OBJ_FLAG_HIDDEN); lvgl_port_unlock(); @@ -742,7 +743,7 @@ static void create_overland_overview_screen() lv_obj_set_style_arc_opa(battery_charge_pulse_arc, LV_OPA_TRANSP, LV_PART_MAIN); lv_obj_set_style_arc_color(battery_charge_pulse_arc, lv_color_hex(0x32D583), LV_PART_INDICATOR); lv_obj_set_style_arc_width(battery_charge_pulse_arc, 24, LV_PART_INDICATOR); - lv_obj_set_style_arc_opa(battery_charge_pulse_arc, LV_OPA_70, LV_PART_INDICATOR); + lv_obj_set_style_arc_opa(battery_charge_pulse_arc, LV_OPA_TRANSP, LV_PART_INDICATOR); lv_obj_add_flag(battery_charge_pulse_arc, LV_OBJ_FLAG_HIDDEN); battery_soc_arc = lv_arc_create(battery_card); @@ -762,10 +763,11 @@ static void create_overland_overview_screen() battery_estimate_label = lv_label_create(battery_card); lv_label_set_text(battery_estimate_label, ""); - lv_obj_set_style_text_color(battery_estimate_label, lv_color_hex(0xB8C0C8), 0); - lv_obj_set_width(battery_estimate_label, 320); + lv_obj_set_style_text_color(battery_estimate_label, lv_color_hex(0xDDE3EA), 0); + lv_obj_set_style_text_font(battery_estimate_label, &lv_font_montserrat_26, 0); + lv_obj_set_width(battery_estimate_label, 340); lv_obj_set_style_text_align(battery_estimate_label, LV_TEXT_ALIGN_CENTER, 0); - lv_obj_align(battery_estimate_label, LV_ALIGN_TOP_MID, 0, 232); + lv_obj_align(battery_estimate_label, LV_ALIGN_TOP_MID, 0, 246); lv_obj_add_flag(battery_estimate_label, LV_OBJ_FLAG_HIDDEN); battery_soc_label = lv_label_create(battery_card); @@ -787,7 +789,7 @@ static void create_overland_overview_screen() battery_current_label = lv_label_create(battery_card); lv_label_set_text(battery_current_label, ""); - lv_obj_set_style_text_font(battery_current_label, &lv_font_montserrat_30, 0); + lv_obj_set_style_text_font(battery_current_label, &lv_font_montserrat_26, 0); lv_obj_set_width(battery_current_label, 260); lv_obj_set_style_text_align(battery_current_label, LV_TEXT_ALIGN_CENTER, 0); lv_obj_align(battery_current_label, LV_ALIGN_TOP_MID, 0, 166);