zhunk 1 سال پیش
والد
کامیت
c87c2a98c1
2فایلهای تغییر یافته به همراه14 افزوده شده و 1 حذف شده
  1. 6 0
      Application_cbd_apm32f1/applications/control.c
  2. 8 1
      Application_cbd_apm32f1/applications/selfcheck.c

+ 6 - 0
Application_cbd_apm32f1/applications/control.c

@@ -2389,6 +2389,7 @@ static void Control_Check_thread_entry(void *parameter)
     while(1)
     {
         if(device_status.update_flag==1) break;
+        if(device_status.version_type==5) break;
         if(device_status.work_status==1&&device_status.heat_sw==1)
         {
             ctr_lamp(ON, 1);
@@ -2417,6 +2418,11 @@ static void Control_Check_thread_entry(void *parameter)
             }else {
                 process = 0;
                 current_second = 0;
+                if(device_status.rain_status==0)
+                {
+                    rt_pin_mode(LED_P, PIN_MODE_OUTPUT);
+                    rt_pin_write(LED_P,ON);
+                }
                 //根据故障码 亮指示灯
                 //灯管故障
                 if(device_status.C01 & (1 << 0))

+ 8 - 1
Application_cbd_apm32f1/applications/selfcheck.c

@@ -192,13 +192,16 @@ int selfcheck(uint8_t type)
     /********************************************************/
     //打开上仓门
     ctr_cangmen_up(OPEN);
+    rt_thread_delay(1000);
     for(int i = 0;i<5;i++)
     {
         current_i[i] = atoi(device_status.power);
         rt_thread_delay(1000);
     }
     ctr_cangmen_up(OFF);
+    rt_thread_delay(1000);
     current_open = calculate_average(current_i,5);
+    LOG_W("上仓门action电流:%d",current_open);
     if(current_open-current_>100)
     {
         HMI_WRITE("selfcheck.t9.bco=2024");
@@ -214,13 +217,16 @@ int selfcheck(uint8_t type)
     /********************************************************/
     //打开下仓门
     ctr_cangmen_down(OPEN);
+    rt_thread_delay(1000);
     for(int i = 0;i<5;i++)
     {
         current_i[i] = atoi(device_status.power);
         rt_thread_delay(1000);
     }
     ctr_cangmen_down(OFF);
+    rt_thread_delay(1000);
     current_open = calculate_average(current_i,5);
+    LOG_W("下仓门action电流:%d",current_open);
     if(current_open-current_>100)
     {
         HMI_WRITE("selfcheck.t10.bco=2024");
@@ -296,8 +302,9 @@ int selfcheck(uint8_t type)
         rt_thread_delay(1000);
     }
     current_open = calculate_average(current_i,5);
+    LOG_W("清扫action电流:%d@%d",current_open,current_);
     rt_thread_delay(1000);
-    if(current_open-current_>120)
+    if(current_open-current_>=100)
     {
         HMI_WRITE("selfcheck.t11.bco=2024");
         device_status.C01 &= ~(1<<10);