Skip to content

Commit 6c4b336

Browse files
wificonf: thread safety
1 parent d6b88b3 commit 6c4b336

File tree

1 file changed

+2
-2
lines changed
  • internal_filesystem/builtin/apps/com.example.wificonf/assets

1 file changed

+2
-2
lines changed

internal_filesystem/builtin/apps/com.example.wificonf/assets/wificonf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ def start_attempt_connecting(ssid,password):
148148
def show_error(message):
149149
print(f"show_error: Displaying error: {message}")
150150
global error_label
151-
error_label.set_text(message)
152-
error_label.remove_flag(lv.obj.FLAG.HIDDEN)
151+
lv.async_call(lambda l: error_label.set_text(message), None)
152+
lv.async_call(lambda l: error_label.remove_flag(lv.obj.FLAG.HIDDEN), None)
153153
timer=lv.timer_create(lambda t: error_label.add_flag(lv.obj.FLAG.HIDDEN),3000,None)
154154
timer.set_repeat_count(1)
155155

0 commit comments

Comments
 (0)