diff --git a/lib/FT18_STW_DISPLAY/FT18_STW_DISPLAY.cpp b/lib/FT18_STW_DISPLAY/FT18_STW_DISPLAY.cpp index 85a827a..8f2e325 100644 --- a/lib/FT18_STW_DISPLAY/FT18_STW_DISPLAY.cpp +++ b/lib/FT18_STW_DISPLAY/FT18_STW_DISPLAY.cpp @@ -173,7 +173,12 @@ bool check_display(uint8_t& val_old, uint8_t val_new, bool& active, uint32_t& be } void update_display(){ + static DisplayPage page = PAGE_DRIVER; + static uint32_t last_cleared; + static bool cleared = true; + if (check_alarms()) { + cleared = true; return; } if (tft.disconnected) { @@ -181,12 +186,10 @@ void update_display(){ } if (check_enc_displays()) { + cleared = true; return; } - static DisplayPage page = PAGE_DRIVER; - static uint32_t last_cleared; - static bool cleared = true; uint32_t now = millis(); if(Stw_data.button1_rises > 0){ Stw_data.button1_rises--;