Skip to content

Commit

Permalink
was: reset display timer on WAS command endpoint result
Browse files Browse the repository at this point in the history
With WAS Command Endpoint enabled, if a command endpoint takes long to
respond, the display timer might expire before the response arrives.
Reset the display timer when a response arrives.

Fixes #349.
  • Loading branch information
stintel committed Dec 20, 2023
1 parent 218993e commit 7a5c42b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main/was.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ static void IRAM_ATTR cb_ws_event(const void *arg_evh, const esp_event_base_t *b
lv_label_set_text(lbl_ln5, cJSON_IsTrue(ok) ? "Success!" : "Error");
}
lvgl_port_unlock();
reset_timer(hdl_display_timer, config_get_int("display_timeout", DEFAULT_DISPLAY_TIMEOUT),
false);
}
}
goto cleanup;
Expand Down

0 comments on commit 7a5c42b

Please sign in to comment.