diff --git a/src/seedsigner/hardware/displays/display_driver.py b/src/seedsigner/hardware/displays/display_driver.py index 8aee00be..5421abfb 100644 --- a/src/seedsigner/hardware/displays/display_driver.py +++ b/src/seedsigner/hardware/displays/display_driver.py @@ -13,7 +13,7 @@ def __init__(self, display_type: str = DISPLAY_TYPE__ST7789, width: int = None, if self.display_type == DISPLAY_TYPE__ST7789: from seedsigner.hardware.displays.st7789_mpy import ST7789 - if height != 240 or width not in [240, 320]: + if height not in [240, 320] or width != 240: raise ValueError("ST7789 display only supports 240x240 or 320x240 resolutions") self.display = ST7789(width=width, height=height) diff --git a/src/seedsigner/models/settings_definition.py b/src/seedsigner/models/settings_definition.py index a320d361..16502b40 100644 --- a/src/seedsigner/models/settings_definition.py +++ b/src/seedsigner/models/settings_definition.py @@ -176,12 +176,12 @@ def map_network_to_embit(cls, network) -> str: # Hardware config settings DISPLAY_CONFIGURATION__ST7789__240x240 = "st7789_240x240" # default; original Waveshare 1.3" display hat - DISPLAY_CONFIGURATION__ST7789__320x240 = "st7789_320x240" + DISPLAY_CONFIGURATION__ST7789__240x320 = "st7789_240x320" DISPLAY_CONFIGURATION__ILI9341__240x320 = "ili9341_240x320" # natively portrait dimensions; we apply a 90° rotation DISPLAY_CONFIGURATION__ILI9486__320x480 = "ili9486_320x480" # natively portrait dimensions; we apply a 90° rotation ALL_DISPLAY_CONFIGURATIONS = [ (DISPLAY_CONFIGURATION__ST7789__240x240, "st7789 240x240"), - (DISPLAY_CONFIGURATION__ST7789__320x240, "st7789 320x240"), + (DISPLAY_CONFIGURATION__ST7789__240x320, "st7789 240x320"), (DISPLAY_CONFIGURATION__ILI9341__240x320, "ili9341 240x320"), # (DISPLAY_CONFIGURATION__ILI9486__320x480, "ili9486 320x480"), # TODO: Enable when ili9486 driver performance is improved ] diff --git a/src/seedsigner/views/settings_views.py b/src/seedsigner/views/settings_views.py index 5e63fffa..29602370 100644 --- a/src/seedsigner/views/settings_views.py +++ b/src/seedsigner/views/settings_views.py @@ -186,7 +186,10 @@ def run(self): value=updated_value ) - if self.settings_entry.attr_name == SettingsConstants.SETTING__DISPLAY_COLOR_INVERTED: + if self.settings_entry.attr_name == SettingsConstants.SETTING__DISPLAY_CONFIGURATION: + self.renderer.initialize_display() + + elif self.settings_entry.attr_name == SettingsConstants.SETTING__DISPLAY_COLOR_INVERTED: self.renderer.disp.invert(enabled=updated_value == SettingsConstants.OPTION__ENABLED) if destination: