dashboard: move battery back hint into separate tile
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
static const char *DASHBOARD_VERSION = "0.1.110-force-battery-state-calc";
|
static const char *DASHBOARD_VERSION = "0.1.111-battery-back-hint-tile";
|
||||||
|
|
||||||
// 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";
|
||||||
|
|||||||
@@ -768,7 +768,7 @@ static void create_battery_detail_screen()
|
|||||||
lv_obj_align(page_label, LV_ALIGN_RIGHT_MID, -10, 0);
|
lv_obj_align(page_label, LV_ALIGN_RIGHT_MID, -10, 0);
|
||||||
|
|
||||||
// Left summary card.
|
// Left summary card.
|
||||||
lv_obj_t *soc_card = create_card(battery_detail_page, "", 300, 500, LV_ALIGN_TOP_LEFT, 32, 68);
|
lv_obj_t *soc_card = create_card(battery_detail_page, "", 300, 390, LV_ALIGN_TOP_LEFT, 32, 68);
|
||||||
|
|
||||||
battery_detail_status_label = lv_label_create(soc_card);
|
battery_detail_status_label = lv_label_create(soc_card);
|
||||||
lv_label_set_text(battery_detail_status_label, "IDLE");
|
lv_label_set_text(battery_detail_status_label, "IDLE");
|
||||||
@@ -794,13 +794,15 @@ static void create_battery_detail_screen()
|
|||||||
lv_obj_set_style_text_align(battery_detail_estimate_label, LV_TEXT_ALIGN_CENTER, 0);
|
lv_obj_set_style_text_align(battery_detail_estimate_label, LV_TEXT_ALIGN_CENTER, 0);
|
||||||
lv_obj_align(battery_detail_estimate_label, LV_ALIGN_TOP_MID, 0, 258);
|
lv_obj_align(battery_detail_estimate_label, LV_ALIGN_TOP_MID, 0, 258);
|
||||||
|
|
||||||
lv_obj_t *back_hint = lv_label_create(soc_card);
|
lv_obj_t *back_hint_card = create_card(battery_detail_page, "", 300, 96, LV_ALIGN_TOP_LEFT, 32, 472);
|
||||||
lv_label_set_text(back_hint, "Swipe right to go back");
|
lv_obj_t *back_hint = lv_label_create(back_hint_card);
|
||||||
lv_obj_set_style_text_color(back_hint, lv_color_hex(0x7D8996), 0);
|
lv_label_set_text(back_hint, "Swipe right\nto go back");
|
||||||
|
lv_obj_set_style_text_color(back_hint, lv_color_hex(0xB8C0C8), 0);
|
||||||
lv_obj_set_style_text_font(back_hint, &lv_font_montserrat_26, 0);
|
lv_obj_set_style_text_font(back_hint, &lv_font_montserrat_26, 0);
|
||||||
lv_obj_set_width(back_hint, 260);
|
lv_obj_set_width(back_hint, 260);
|
||||||
lv_obj_set_style_text_align(back_hint, LV_TEXT_ALIGN_CENTER, 0);
|
lv_obj_set_style_text_align(back_hint, LV_TEXT_ALIGN_CENTER, 0);
|
||||||
lv_obj_align(back_hint, LV_ALIGN_BOTTOM_MID, 0, -28);
|
lv_obj_center(back_hint);
|
||||||
|
|
||||||
|
|
||||||
// Right-side compact metrics. Fits fully within 1024x600.
|
// Right-side compact metrics. Fits fully within 1024x600.
|
||||||
battery_detail_value_label(battery_detail_page, "Voltage", &battery_detail_voltage_label, 356, 68);
|
battery_detail_value_label(battery_detail_page, "Voltage", &battery_detail_voltage_label, 356, 68);
|
||||||
|
|||||||
Reference in New Issue
Block a user