From 8de88dd3fde82ab7ac2464f9b19adfdf65be00d7 Mon Sep 17 00:00:00 2001 From: NellowTCS Date: Thu, 27 Nov 2025 14:40:33 -0700 Subject: [PATCH] Software Rotation for ST7789 i8080 Driver (#422) --- Drivers/ST7789-i8080/Source/St7789i8080Display.cpp | 2 +- Tactility/Source/app/display/Display.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Drivers/ST7789-i8080/Source/St7789i8080Display.cpp b/Drivers/ST7789-i8080/Source/St7789i8080Display.cpp index d345b9a0..c0995ee2 100644 --- a/Drivers/ST7789-i8080/Source/St7789i8080Display.cpp +++ b/Drivers/ST7789-i8080/Source/St7789i8080Display.cpp @@ -311,7 +311,7 @@ bool St7789i8080Display::startLvgl() { .flags = { .buff_dma = true, .buff_spiram = false, - .sw_rotate = false, + .sw_rotate = true, .swap_bytes = true, .full_refresh = false, .direct_mode = false diff --git a/Tactility/Source/app/display/Display.cpp b/Tactility/Source/app/display/Display.cpp index 21cd26f9..7479f11e 100644 --- a/Tactility/Source/app/display/Display.cpp +++ b/Tactility/Source/app/display/Display.cpp @@ -148,8 +148,8 @@ public: lv_obj_set_style_border_color(orientation_dropdown, lv_color_hex(0xFAFAFA), LV_PART_MAIN); lv_obj_set_style_border_width(orientation_dropdown, 1, LV_PART_MAIN); lv_obj_add_event_cb(orientation_dropdown, onOrientationSet, LV_EVENT_VALUE_CHANGED, this); - auto orientation = settings::display::toLvglDisplayRotation(displaySettings.orientation); - lv_dropdown_set_selected(orientation_dropdown, orientation); + // Set the dropdown to match current orientation enum + lv_dropdown_set_selected(orientation_dropdown, static_cast(displaySettings.orientation)); } void onHide(TT_UNUSED AppContext& app) override {