Software Rotation for ST7789 i8080 Driver (#422)

This commit is contained in:
NellowTCS 2025-11-27 14:40:33 -07:00 committed by GitHub
parent c6cc4034df
commit 8de88dd3fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -311,7 +311,7 @@ bool St7789i8080Display::startLvgl() {
.flags = { .flags = {
.buff_dma = true, .buff_dma = true,
.buff_spiram = false, .buff_spiram = false,
.sw_rotate = false, .sw_rotate = true,
.swap_bytes = true, .swap_bytes = true,
.full_refresh = false, .full_refresh = false,
.direct_mode = false .direct_mode = false

View File

@ -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_color(orientation_dropdown, lv_color_hex(0xFAFAFA), LV_PART_MAIN);
lv_obj_set_style_border_width(orientation_dropdown, 1, 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); lv_obj_add_event_cb(orientation_dropdown, onOrientationSet, LV_EVENT_VALUE_CHANGED, this);
auto orientation = settings::display::toLvglDisplayRotation(displaySettings.orientation); // Set the dropdown to match current orientation enum
lv_dropdown_set_selected(orientation_dropdown, orientation); lv_dropdown_set_selected(orientation_dropdown, static_cast<uint16_t>(displaySettings.orientation));
} }
void onHide(TT_UNUSED AppContext& app) override { void onHide(TT_UNUSED AppContext& app) override {