From 4a6095a1dce0237fde489781a54d17e25dd0920a Mon Sep 17 00:00:00 2001 From: rkcf Date: Sat, 4 Feb 2023 19:29:03 -0600 Subject: [PATCH] Fix: switch h and v resolutions and update title label --- main/esp32-sequencer.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/main/esp32-sequencer.c b/main/esp32-sequencer.c index 3a67641..42426db 100644 --- a/main/esp32-sequencer.c +++ b/main/esp32-sequencer.c @@ -59,8 +59,8 @@ static QueueHandle_t control_event_queue = NULL; #define LEDC_GATE_OUT (6) /* SPI LCD Config and Pins */ -#define LCD_V_RES 320 -#define LCD_H_RES 240 +#define LCD_V_RES 240 +#define LCD_H_RES 320 #define LCD_SCLK_PIN 40 #define LCD_MOSI_PIN 39 @@ -306,7 +306,7 @@ static void display_init(void) { .speed_mode = LEDC_LOW_SPEED_MODE, .timer_sel = LEDC_TIMER_0, .intr_type = LEDC_INTR_DISABLE, - .duty = 3000, + .duty = 6000, .hpoint = 0 }; ESP_ERROR_CHECK(ledc_channel_config(&ledc_lcd_bk_light_channel)); @@ -391,7 +391,7 @@ static void gui_create(void) { lv_style_init(&gui_style); // Set background color - /* lv_obj_set_style_bg_color(lv_scr_act(), lv_color_hex(0x003a57), LV_PART_MAIN); */ + lv_obj_set_style_bg_color(screen, lv_color_hex(0xa1e5d0), LV_PART_MAIN); // Load VCR OSD Mono Font https://www.dafont.com/vcr-osd-mono.font // Converted with https://lvgl.io/tools/fontconverter @@ -399,10 +399,11 @@ static void gui_create(void) { // Set the font in the style lv_style_set_text_font(&gui_style, &vcr_osd_mono_18); + lv_style_set_text_color(&gui_style, lv_color_hex(0x000000)); // Create and set lable text lv_obj_t * title_label = lv_label_create(lv_scr_act()); - lv_label_set_text(title_label, "Hello World!"); + lv_label_set_text(title_label, "ESP32 Sequencer\n"); lv_obj_add_style(title_label, &gui_style, LV_STATE_DEFAULT); // Align label to center top