Fix universal display slow response

This commit is contained in:
Theo Arends 2024-07-17 17:13:24 +02:00
parent a448f538aa
commit 105d18b9b6
1 changed files with 26 additions and 17 deletions

View File

@ -533,11 +533,20 @@ int8_t replacepin(char **cp, int16_t pin) {
return res;
}
/*********************************************************************************************/
#ifdef USE_DISPLAY_MODES1TO5
void UDISP_PrintLog(void) {
disp_refresh--;
if (!disp_refresh) {
// This can take over 3 seconds depending on renderer->Updateframe() speed
// due to not connected busy pin (configure as MISO)
static bool printlog_mutex = false;
if (disp_refresh) { disp_refresh--; }
if (disp_refresh || printlog_mutex || TasmotaGlobal.restart_flag || TasmotaGlobal.ota_state_flag) {
return;
}
printlog_mutex = true;
disp_refresh = Settings->display_refresh;
if (!disp_screen_buffer_cols) { DisplayAllocScreenBuffer(); }
@ -557,7 +566,7 @@ void UDISP_PrintLog(void) {
renderer->println(disp_screen_buffer[last_row]);
renderer->Updateframe();
}
}
printlog_mutex = false;
}
void UDISP_Time(void) {