zhunk 1 vuosi sitten
vanhempi
commit
ef2e289d00

+ 12 - 19
Application_CBD/applications/control.c

@@ -1724,7 +1724,11 @@ void ResetInit(void)
             ctr_Fan_PUT(OFF);
             ctr_Fan_PUT(OFF);
             ctr_Fan_IN(OFF);
             ctr_Fan_IN(OFF);
             #endif
             #endif
-           if(device_status.version_type==4||device_status.version_type==41||device_status.version_type==42||device_status.version_type==12)
+           if(device_status.version_type==4||
+                   device_status.version_type==41||
+                   device_status.version_type==42||
+                   device_status.version_type==43||
+                   device_status.version_type==12)
            {
            {
                device_status.clear_status=1;
                device_status.clear_status=1;
                while(device_status.clear_status==1){
                while(device_status.clear_status==1){
@@ -2650,7 +2654,7 @@ static void Control_Clear_thread_entry(void *parameter)
 {
 {
     static int selfcheck_cnt = 0;
     static int selfcheck_cnt = 0;
     float voltage_f = 0.0;
     float voltage_f = 0.0;
-    static uint8_t rain_clear = 0;
+    static uint32_t rain_clear = 0;
     while(1)
     while(1)
     {
     {
         #if ROBOT_EN ==1
         #if ROBOT_EN ==1
@@ -2718,25 +2722,14 @@ static void Control_Clear_thread_entry(void *parameter)
         }
         }
         if(device_status.rain_status==2)
         if(device_status.rain_status==2)
         {
         {
-            ctr_shake(ON, 10);                //震动1S钟
-            while(device_status.ctr_up_motor!=0)    //等待上仓门完全打开
-            {
-                rt_thread_delay(1000);
-            }
-            ctr_shake(ON, 2);                //震动0.2S钟
-            rt_thread_delay(1000);
-            device_status.ctr_up_motor = 2;  //关闭上仓门
-            calorstat(5*60);                 //加热5分钟
-            device_status.ctr_down_motor = 1;   //打开下仓门
-            while(device_status.ctr_down_motor!=0)    //等待下仓门完全打开
-            {
-                rt_thread_delay(1000);
+            rain_clear++;
+            if(rain_clear>=3500){
+                device_status.rain_status = 0;
             }
             }
-            rt_thread_delay(1000);
-            device_status.ctr_down_motor = 2;  //关闭下仓门
-            device_status.clear_status= 1;
-            device_status.rain_status = 0;   //解除雨控
+        }else {
+            rain_clear==0;
         }
         }
+
         if(device_status.clear_status==1)
         if(device_status.clear_status==1)
         {
         {
             ///if(ctr_clear(1200)==0)
             ///if(ctr_clear(1200)==0)

+ 2 - 3
Application_CBD/applications/control.h

@@ -26,15 +26,14 @@
     #define VERSION_HK          "1.(3ledV9).41(HK)"      //4.0海康-三色光源
     #define VERSION_HK          "1.(3ledV9).41(HK)"      //4.0海康-三色光源
     #define VERSION_HK_2000W    "1.3led0.40(2000W)"       //水稻
     #define VERSION_HK_2000W    "1.3led0.40(2000W)"       //水稻
 #else
 #else
-    #define VERSION_HK          "1.57.41(HK)"            //4.0海康-1200W
-    #define VERSION_HK_2000W    "1.57.40(2000W)"         //4.0水稻
+    #define VERSION_HK          "1.58.41(HK)"            //4.0海康-1200W
+    #define VERSION_HK_2000W    "1.58.40(2000W)"         //4.0水稻
 #endif
 #endif
 
 
 #define VERSION_ZP          "1.58.1(ZP)"            //1.0转盘
 #define VERSION_ZP          "1.58.1(ZP)"            //1.0转盘
 #define VERSION_GK          "1.58.1(GK)"            //1.0高空
 #define VERSION_GK          "1.58.1(GK)"            //1.0高空
 
 
 #define VERSION_XCT         "1.13.6(HK)"            //吸虫塔-海康
 #define VERSION_XCT         "1.13.6(HK)"            //吸虫塔-海康
-#define VERSION_V5          "1.2.5(HK)"             //5.0
 #define VERSION_Robot       "1.0(robot)"            //展厅机器人
 #define VERSION_Robot       "1.0(robot)"            //展厅机器人
 
 
 #define VERSION_BZY         "2.60"                   //孢子仪
 #define VERSION_BZY         "2.60"                   //孢子仪

+ 3 - 6
Application_CBD/applications/dtu_uart2.c

@@ -255,7 +255,7 @@ static void dtu_thread_entry_send(void *parameter)
                             power_i = 0;
                             power_i = 0;
                         }
                         }
                     }
                     }
-                    if(atoi(device_status.voltage)>12&&device_status.power_status==0)      //电压正常
+                    if(atoi(device_status.voltage)>=12&&device_status.power_status==0)      //电压正常
                     {
                     {
                         device_status.power_status = 1;
                         device_status.power_status = 1;
                         ctr_router(ON);
                         ctr_router(ON);
@@ -301,10 +301,10 @@ static void dtu_thread_entry_send(void *parameter)
                     check_i = 0;
                     check_i = 0;
                 }
                 }
             }
             }
-            if(Read_Real_Voltage()/100>10&&device_status.power_status==0)
+            if(Read_Real_Voltage()/100>=12)
             {
             {
                 check_i = 0;
                 check_i = 0;
-                LOG_I("电源恢复正常,打开路由器和RTU供电!");
+                LOG_W("电源恢复正常,打开路由器和RTU供电!");
                 device_status.power_status = 1;
                 device_status.power_status = 1;
                 //打开路由器和RTU供电
                 //打开路由器和RTU供电
                 ctr_router(ON);
                 ctr_router(ON);
@@ -770,9 +770,6 @@ char * makeJson()
         cJSON_AddStringToObject(pSubJson,"lux",device_status.lux);
         cJSON_AddStringToObject(pSubJson,"lux",device_status.lux);
         cJSON_AddStringToObject(pSubJson,"ap",device_status.ap);
         cJSON_AddStringToObject(pSubJson,"ap",device_status.ap);
     }
     }
-    else if (device_status.version_type==5) {
-        rt_sprintf(device_status.driver,"%s-%s",VERSION_V5,device_status.driver_4g);
-    }
     else if (device_status.version_type==6) {
     else if (device_status.version_type==6) {
         rt_sprintf(device_status.driver,"%s-%s",VERSION_XCT,device_status.driver_4g);
         rt_sprintf(device_status.driver,"%s-%s",VERSION_XCT,device_status.driver_4g);
     }
     }

+ 2 - 15
Application_CBD/applications/hmi.c

@@ -571,6 +571,7 @@ static void HMI_Decode(void)
         if(device_status.version_type==4||  //水稻
         if(device_status.version_type==4||  //水稻
                 device_status.version_type==41||    //4.0
                 device_status.version_type==41||    //4.0
                 device_status.version_type==42||    //低端款
                 device_status.version_type==42||    //低端款
+                device_status.version_type==43||    //中端款
                 device_status.version_type==12)     //高空带拍照
                 device_status.version_type==12)     //高空带拍照
         {
         {
             device_status.clear_status=1;
             device_status.clear_status=1;
@@ -607,6 +608,7 @@ static void HMI_Decode(void)
     else if (strstr(rx_buffer,"putTest.switchLamp=1")!=NULL)
     else if (strstr(rx_buffer,"putTest.switchLamp=1")!=NULL)
     {
     {
         device_status.test_flag=1;
         device_status.test_flag=1;
+        device_status.rain_status = 0;
         rt_kprintf("Open Lamp!\n");
         rt_kprintf("Open Lamp!\n");
         ctr_lamp(ON,1);
         ctr_lamp(ON,1);
         #if LAMP_EN == 1
         #if LAMP_EN == 1
@@ -1322,18 +1324,6 @@ static void HMI_Decode(void)
 
 
         }
         }
     }
     }
-    //5.0测报灯
-    else if (strstr(rx_buffer,"SwversionV5")!=NULL) {
-        device_status.dtype = 3;
-        if(device_status.version_type!=5)
-        {
-            device_status.version_type = 5;
-            sprintf(device_status.driver, "%s",VERSION_V5);
-            ef_set_env_blob("version_type",&device_status.version_type,sizeof(device_status.version_type));        //版本类型
-            ef_set_env_blob("dtype",&device_status.dtype,sizeof(device_status.dtype));        //版本类型
-            MA_save();
-        }
-    }
     //吸虫塔
     //吸虫塔
     else if (strstr(rx_buffer,"SwversionV6")!=NULL) {
     else if (strstr(rx_buffer,"SwversionV6")!=NULL) {
         device_status.dtype = 3;
         device_status.dtype = 3;
@@ -2042,9 +2032,6 @@ void Check_ParamConfig(void)
         else if (device_status.version_type==41) {
         else if (device_status.version_type==41) {
             rt_sprintf(device_status.driver, "%s",VERSION_HK);
             rt_sprintf(device_status.driver, "%s",VERSION_HK);
         }
         }
-        else if (device_status.version_type==5) {
-            rt_sprintf(device_status.driver, "%s",VERSION_V5);
-        }
         else if (device_status.version_type==6)
         else if (device_status.version_type==6)
         {
         {
             //打开相机供电;
             //打开相机供电;

+ 0 - 3
Application_CBD/applications/sht30_collect.c

@@ -303,10 +303,7 @@ static void Power_ReadCheck(void *parameter)
                 {
                 {
                     LOG_D("雨控触发:%d",Read_Rain_Voltage());
                     LOG_D("雨控触发:%d",Read_Rain_Voltage());
                     rain_cnt = 0;
                     rain_cnt = 0;
-                    #if DZ_250723 == 0
                     device_status.rain_status = 2;
                     device_status.rain_status = 2;
-                    device_status.ctr_up_motor = 1;    //打开上仓门
-                    #endif
                 }
                 }
             }
             }
             //LOG_D("rain_cnt:%d-value:%d",rain_cnt,Read_Rain_Voltage());
             //LOG_D("rain_cnt:%d-value:%d",rain_cnt,Read_Rain_Voltage());

+ 1 - 0
Application_CBD/readme.md

@@ -5,6 +5,7 @@
 	#define VERSION_GK          "1.58.1(GK)"            //1.0高空
 	#define VERSION_GK          "1.58.1(GK)"            //1.0高空
 	1. 针对雨控触发的更新:
 	1. 针对雨控触发的更新:
 		雨控的解除时间修改为持续检测1个小时没有雨控再解除;
 		雨控的解除时间修改为持续检测1个小时没有雨控再解除;
+		如果雨控触发已经解除(雨控上没水了),可以在屏幕上打开灯管,提前解除雨控的1小时延时,方便设备的现场测试;
 	2. 工作流程优化,震动之后进入收集模式,拍照清扫并行执行,工作状态下拍照后自动执行清扫;
 	2. 工作流程优化,震动之后进入收集模式,拍照清扫并行执行,工作状态下拍照后自动执行清扫;
 	3. 修复测试模式频繁开关上下仓门会导致开启或者关闭不完全的情况;
 	3. 修复测试模式频繁开关上下仓门会导致开启或者关闭不完全的情况;
 	4. 启用交流供电 常加热;
 	4. 启用交流供电 常加热;