diff --git a/config.yaml b/config.yaml index cc2958b2..23814969 100644 --- a/config.yaml +++ b/config.yaml @@ -69,3 +69,9 @@ display: # Set to true to reverse display orientation (landscape <-> reverse landscape, portrait <-> reverse portrait) # Note: Display basic orientation (portrait or landscape) is defined by the theme you have selected DISPLAY_REVERSE: false + + # Reset display on startup: true/false + # By default, this program resets the display on startup, in case it is in a degraded state from previous runs. + # This behavior causes the display to disconnect/reconnect, and the COM port to change. + # On some displays (like rev. A) it can be an issue, in this case change the value to "false". + RESET_ON_STARTUP: true \ No newline at end of file diff --git a/library/display.py b/library/display.py index 9d55e90d..55f8df5a 100644 --- a/library/display.py +++ b/library/display.py @@ -90,7 +90,11 @@ def __init__(self): def initialize_display(self): # Reset screen in case it was in an unstable state (screen is also cleared) - self.lcd.Reset() + # Can be disabled by config. option + if config.CONFIG_DATA["display"].get("RESET_ON_STARTUP", False): + self.lcd.Reset() + else: + logger.debug("RESET_ON_STARTUP is false: display will not be reset") # Send initialization commands self.lcd.InitializeComm()