dashboard: use vehicle image icons

This commit is contained in:
2026-06-11 02:24:06 -06:00
parent a0a7bbf7d2
commit 31552beeb4
4 changed files with 1683 additions and 3 deletions
@@ -7,6 +7,8 @@
#include <lvgl.h>
#include "lvgl_v8_port.h"
#include "dashboard_config.h"
#include "gas_pump.h"
#include "water_temp.h"
#include "dashboard_status_model.h"
using namespace esp_panel::drivers;
@@ -1248,7 +1250,11 @@ static void create_overland_overview_screen()
lv_obj_align(temp_tile_name_labels[i], LV_ALIGN_TOP_MID, 0, 86);
}
lv_obj_t *coolant_icon = create_coolant_icon(vehicle_card);
lv_obj_t *coolant_icon = lv_img_create(vehicle_card);
lv_img_set_src(coolant_icon, &water_coolant);
lv_img_set_zoom(coolant_icon, 12);
lv_obj_set_style_img_recolor(coolant_icon, lv_color_hex(0x84CAFF), 0);
lv_obj_set_style_img_recolor_opa(coolant_icon, LV_OPA_COVER, 0);
lv_obj_align(coolant_icon, LV_ALIGN_TOP_LEFT, 12, 8);
#if LV_USE_METER
@@ -1284,7 +1290,11 @@ static void create_overland_overview_screen()
lv_obj_set_style_text_align(vehicle_coolant_value_label, LV_TEXT_ALIGN_CENTER, 0);
lv_obj_align(vehicle_coolant_value_label, LV_ALIGN_TOP_MID, 0, 126);
lv_obj_t *fuel_icon = create_fuel_icon(vehicle_card);
lv_obj_t *fuel_icon = lv_img_create(vehicle_card);
lv_img_set_src(fuel_icon, &gas_pump);
lv_img_set_zoom(fuel_icon, 10);
lv_obj_set_style_img_recolor(fuel_icon, lv_color_hex(0xDDE3EA), 0);
lv_obj_set_style_img_recolor_opa(fuel_icon, LV_OPA_COVER, 0);
lv_obj_align(fuel_icon, LV_ALIGN_BOTTOM_LEFT, 10, -14);
vehicle_fuel_bar = lv_bar_create(vehicle_card);