diff --git a/lib/FT18_STW_DISPLAY/FT18_STW_DISPLAY.cpp b/lib/FT18_STW_DISPLAY/FT18_STW_DISPLAY.cpp index c4cb73b..17d5c22 100644 --- a/lib/FT18_STW_DISPLAY/FT18_STW_DISPLAY.cpp +++ b/lib/FT18_STW_DISPLAY/FT18_STW_DISPLAY.cpp @@ -241,7 +241,17 @@ void update_display() { return; } if (tft.disconnected) { - return; + uint32_t now = millis(); + if (now - last_cleared < 1000) { + return; + } + digitalWrite(reset, LOW); + delay(100); + digitalWrite(reset, HIGH); + tft.disconnected = false; + tft.clear(); + cleared = true; + last_cleared = now; } if (check_enc_displays()) { @@ -258,7 +268,6 @@ void update_display() { Stw_data.button4_rises = 0; view = (DisplayView)((view + 1) % (VIEW_LAST + 1)); tft.clear(); - last_cleared = now; cleared = true; }