Redraw screen after alarms/changing encoders

This commit is contained in:
Jasper Blanckenburg 2022-03-13 19:54:54 +01:00
parent 5eecc507a0
commit 894ced16ef
1 changed files with 6 additions and 3 deletions

View File

@ -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--;