Attempt to resurrect the display after disconnect
This commit is contained in:
parent
1fdadd8b85
commit
1a72d6aa0f
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue