Browse Source

LED 闪灯bug

liyi 9 months ago
parent
commit
e0b305a496
2 changed files with 8 additions and 3 deletions
  1. 6 1
      f427/applications/paras.c
  2. 2 2
      f427/applications/ui/led.c

+ 6 - 1
f427/applications/paras.c

@@ -3759,10 +3759,15 @@ static int ini_free(paras_handle_t *h)
 static int ini_save(paras_handle_t *h)
 {
     int r=-1;
+		r = proc_misc(h->dic, PARAS_WRITE, &h->paras.misc);
+    if(r) {
+        LOGE("___ini_w_misc failed\n");
+        return -1;
+    }
     
     r = proc_prod(h->dic, PARAS_WRITE, &h->paras.prod);
     if(r) {
-        LOGE("___ini_w_dev failed\n");
+        LOGE("___ini_w_proc failed\n");
         return -1;
     }
 

+ 2 - 2
f427/applications/ui/led.c

@@ -82,7 +82,7 @@ static void led_handler(void *arg, int last)
             gpio_set(h->io, h->info->off_level);
         }
 
-        led_reset();
+//        led_reset();
     } 
 }
 //////////////////////////////////////////////////
@@ -177,7 +177,7 @@ int led_reset(void)
 
     h->mode = -1;
     timer_stop(h->tmr);
-    gpio_set(h->data[LED_ID_RED].io, led_info[LED_ID_RED].off_level);
+    gpio_set(h->data[LED_ID_GREEN].io, led_info[LED_ID_GREEN].off_level);
     return 0;
 }