From f5a70b3e43904d49d2303ff49a6ac908ce301a71 Mon Sep 17 00:00:00 2001 From: Federico Amedeo Izzo Date: Sat, 5 Jun 2021 16:32:05 +0200 Subject: [PATCH] Fixed Initial GUI rendering with an empty state --- openrtx/src/threads.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/openrtx/src/threads.c b/openrtx/src/threads.c index f6126b17..cb2c7075 100644 --- a/openrtx/src/threads.c +++ b/openrtx/src/threads.c @@ -62,11 +62,12 @@ void *ui_task(void *arg) rtxStatus_t rtx_cfg; // Get initial state local copy -// OSMutexPend(&state_mutex, 0u, OS_OPT_PEND_BLOCKING, 0u, &os_err); -// OSMutexPost(&state_mutex, OS_OPT_POST_NONE, &os_err); + pthread_mutex_lock(&state_mutex); + ui_saveState(); + pthread_mutex_unlock(&state_mutex); // Initial GUI draw - ui_updateGUI(last_state); + ui_updateGUI(); gfx_render(); while(1)