aanper 5 лет назад
Родитель
Сommit
a1780154df
1 измененных файлов с 5 добавлено и 3 удалено
  1. 5 3
      applications/nfc/nfc.c

+ 5 - 3
applications/nfc/nfc.c

@@ -187,10 +187,12 @@ void nfc_test_callback(void* context) {
     Nfc* nfc = context;
 
     dispatcher_lock(nfc->dispatcher);
+    
+    nfc->screen = 0;
+    widget_enabled_set(nfc->widget, true);
 
-    if(!nfc->worker) {
-        nfc->screen = 0;
-        widget_enabled_set(nfc->widget, true);
+    if(nfc->ret == ERR_NONE && !nfc->worker) {
+        // TODO change to fuirac_start
         nfc->worker = osThreadNew(nfc_worker_task, nfc, &nfc->worker_attr);
     }