Fix: switch h and v resolutions and update title label

main
rkcf 2023-02-04 19:29:03 -06:00
parent bb63df4f61
commit 4a6095a1dc
1 changed files with 6 additions and 5 deletions

View File

@ -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