dashboard: expand relay controls in bottom card

This commit is contained in:
2026-06-10 02:32:19 -06:00
parent 65039f9ae3
commit 8de05a1f99
2 changed files with 7 additions and 7 deletions
@@ -1,6 +1,6 @@
#pragma once #pragma once
static const char *DASHBOARD_VERSION = "0.1.25-taller-relay-strip"; static const char *DASHBOARD_VERSION = "0.1.26-relay-fill-card";
// 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";
@@ -34,7 +34,7 @@ static bool relay_states[6] = {false};
static int relay_count = 0; static int relay_count = 0;
static const int RELAY_STRIP_X = 32; static const int RELAY_STRIP_X = 32;
static const int RELAY_STRIP_Y = 390; static const int RELAY_STRIP_Y = 386;
static const int RELAY_STRIP_W = 960; static const int RELAY_STRIP_W = 960;
static const int RELAY_BUTTON_GAP = 10; static const int RELAY_BUTTON_GAP = 10;
@@ -277,8 +277,8 @@ static void layout_relay_buttons()
} }
if (i < relay_count) { if (i < relay_count) {
lv_obj_set_size(relay_buttons[i], button_width, 102); lv_obj_set_size(relay_buttons[i], button_width, 132);
lv_obj_align(relay_buttons[i], LV_ALIGN_TOP_LEFT, start_x + (i * (button_width + RELAY_BUTTON_GAP)), 34); lv_obj_align(relay_buttons[i], LV_ALIGN_TOP_LEFT, start_x + (i * (button_width + RELAY_BUTTON_GAP)), 18);
} }
} }
} }
@@ -820,8 +820,8 @@ static void create_overland_overview_screen()
for (int i = 0; i < 6; i++) { for (int i = 0; i < 6; i++) {
relay_buttons[i] = lv_btn_create(relay_card); relay_buttons[i] = lv_btn_create(relay_card);
lv_obj_set_size(relay_buttons[i], 140, 102); lv_obj_set_size(relay_buttons[i], 140, 132);
lv_obj_align(relay_buttons[i], LV_ALIGN_TOP_LEFT, 14 + (i * 150), 34); lv_obj_align(relay_buttons[i], LV_ALIGN_TOP_LEFT, 14 + (i * 150), 18);
lv_obj_add_event_cb( lv_obj_add_event_cb(
relay_buttons[i], relay_buttons[i],
relay_button_event_cb, relay_button_event_cb,
@@ -831,7 +831,7 @@ static void create_overland_overview_screen()
relay_button_labels[i] = lv_label_create(relay_buttons[i]); relay_button_labels[i] = lv_label_create(relay_buttons[i]);
lv_label_set_text(relay_button_labels[i], "Output\n--"); lv_label_set_text(relay_button_labels[i], "Output\n--");
lv_obj_set_style_text_font(relay_button_labels[i], &lv_font_montserrat_30, 0); lv_obj_set_style_text_font(relay_button_labels[i], &lv_font_montserrat_36, 0);
lv_obj_set_style_text_align(relay_button_labels[i], LV_TEXT_ALIGN_CENTER, 0); lv_obj_set_style_text_align(relay_button_labels[i], LV_TEXT_ALIGN_CENTER, 0);
lv_obj_center(relay_button_labels[i]); lv_obj_center(relay_button_labels[i]);
lv_obj_add_flag(relay_buttons[i], LV_OBJ_FLAG_HIDDEN); lv_obj_add_flag(relay_buttons[i], LV_OBJ_FLAG_HIDDEN);