Attempt to resurrect the display after disconnect
This commit is contained in:
parent
1fdadd8b85
commit
1a72d6aa0f
@ -241,7 +241,17 @@ void update_display() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (tft.disconnected) {
|
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()) {
|
if (check_enc_displays()) {
|
||||||
@ -258,7 +268,6 @@ void update_display() {
|
|||||||
Stw_data.button4_rises = 0;
|
Stw_data.button4_rises = 0;
|
||||||
view = (DisplayView)((view + 1) % (VIEW_LAST + 1));
|
view = (DisplayView)((view + 1) % (VIEW_LAST + 1));
|
||||||
tft.clear();
|
tft.clear();
|
||||||
last_cleared = now;
|
|
||||||
cleared = true;
|
cleared = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user