zhunk 1 год назад
Родитель
Сommit
adafe4b36b

+ 4 - 3
Application_CBD/applications/control.c

@@ -2718,10 +2718,13 @@ static void Control_Clear_thread_entry(void *parameter)
         }
         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;   //打开下仓门
@@ -2731,7 +2734,6 @@ static void Control_Clear_thread_entry(void *parameter)
             }
             rt_thread_delay(1000);
             device_status.ctr_down_motor = 2;  //关闭下仓门
-            ctr_shake(ON, 5);                //震动0.5S钟
             device_status.clear_status= 1;
             device_status.rain_status = 0;   //解除雨控
         }
@@ -2752,9 +2754,8 @@ static void Control_Heat_thread_entry(void *parameter)
     {
         if(device_status.work_status==1&&device_status.heat_sw==1)
         {
-            ctr_lamp(ON, 1);
-            rt_thread_delay(10000);
             calorstat(device_status.heattime*60);
+            rt_thread_delay(10000);
         }
         else
         {

+ 27 - 6
Application_CBD/applications/hmi.c

@@ -568,7 +568,10 @@ static void HMI_Decode(void)
     //清扫
     else if (strstr(rx_buffer,"clear")!=NULL) {
         rt_kprintf("\n清扫!\n");
-        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||    //4.0
+                device_status.version_type==42||    //低端款
+                device_status.version_type==12)     //高空带拍照
         {
             device_status.clear_status=1;
         }
@@ -1260,6 +1263,19 @@ static void HMI_Decode(void)
 
         }
     }
+    //中端款
+    else if (strstr(rx_buffer,"SwversionV43")!=NULL) {
+        device_status.dtype = 3;
+        if(device_status.version_type != 43)
+        {
+            device_status.dtype = 3;
+            device_status.version_type = 43;
+            sprintf(device_status.driver, "%s",VERSION_HK_2000W);
+            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,"SwversionV42")!=NULL) {
         device_status.dtype = 3;
@@ -1492,6 +1508,7 @@ static void Ctr_Mortor_entry(void* parameter)
                 ctr_cangmen_up(OFF);
                 num_up_open = 200;
             }
+            num_up_close = 200;
         }
         else if(device_status.ctr_up_motor==2)
         {
@@ -1502,31 +1519,29 @@ static void Ctr_Mortor_entry(void* parameter)
                 ctr_cangmen_up(OFF);
                 num_up_close= 200;
             }
+            num_up_open = 200;
         }
         if (device_status.ctr_down_motor == 1)
         {
             ctr_cangmen_down(OPEN);
             num_down_open--;
-            //如果关闭仓门1S后检测不到电流增大,则判定为异常
             if (num_down_open == 0)
             {
                 ctr_cangmen_down(OFF);
                 num_down_open = 200;
             }
-//            LOG_D("下仓门打开电流:%d",current_t[num_down_open]);
+            num_down_close = 200;
         }
         else if (device_status.ctr_down_motor == 2)
         {
             ctr_cangmen_down(CLOSE);
             num_down_close--;
-//            current_t[num_down_close] = atoi(device_status.power);
-
             if (num_down_close == 0)
             {
                ctr_cangmen_down(OFF);
                num_down_close = 200;
             }
-//            LOG_D("下仓门关闭电流:%d",current_t[num_down_close]);
+            num_down_open = 200;
         }
         if(device_status.sun_test==1)
         {
@@ -2081,6 +2096,7 @@ void Check_ParamConfig(void)
         LOG_I("PowerType:%d",device_status.Power_Type);
         LOG_I("deviceId:%s",device_status.deviceId);
         LOG_I("handle_bugger:%d",device_status.handle_bugger);
+        LOG_W("heat_sw加热开关:%d",device_status.heat_sw);
     }
     //RTC时间判断,如果当前年份小于2020,提示需要设置时间,切换为光控
     if(device_status.update_flag==1)
@@ -2170,6 +2186,9 @@ void ResetParamDefault(void)
     device_status.collecting_sh2 = 14;
     device_status.collecting_eh2 = 16;
     device_status.Power_Type = 0;
+    device_status.heat_sw = 1;
+
+    ef_set_env_blob("heat_sw", &device_status.heat_sw, sizeof(device_status.heat_sw));
     ef_set_env_blob("Power_Type", &device_status.Power_Type, sizeof(device_status.Power_Type));
 
     ef_set_env_blob("dattim",&device_status.dattim,sizeof(device_status.dattim));        //上传时间
@@ -2252,6 +2271,8 @@ void ResetParamDefault_DC(void)
     device_status.timeSwitch = 0;
     device_status.Power_Type = 1;
     device_status.handle_bugger = 0;
+    device_status.heat_sw = 0;
+    ef_set_env_blob("heat_sw",&device_status.heat_sw,sizeof(device_status.heat_sw));        //上传时间
     ef_set_env_blob("dattim",&device_status.dattim,sizeof(device_status.dattim));        //上传时间
     ef_set_env_blob("handle_bugger", &device_status.handle_bugger, sizeof(device_status.handle_bugger));
     ef_set_env_blob("Power_Type", &device_status.Power_Type, sizeof(device_status.Power_Type));

+ 1 - 1
Application_CBD/packages/EasyFlash-latest/src/ef_fal_port.c

@@ -79,7 +79,7 @@ static const ef_env default_env_set[] = {
         {"run_sta","0"},    //孢子仪,运行状态
         {"cul_time","1"},   //孢子仪,培养时间
         {"cold_sw","0"},    //
-        {"wind_sw","0"},    //
+        {"heat_sw","0"},    //
         {"run_sta","0"},    //
         {"collecting_sh1","0"},    //
         {"collecting_eh1","0"},    //

+ 4 - 2
Application_CBD/readme.md

@@ -4,9 +4,11 @@
 	#define VERSION_ZP          "1.58.1(ZP)"            //1.0转盘
 	#define VERSION_GK          "1.58.1(GK)"            //1.0高空
 	1. 针对雨控触发的更新:
-		触发雨控后的解除时间调整:检测到雨控解除持续5分钟后,打开上仓门后关闭上仓门,加热5分钟,打开下仓门,震动,执行清扫;
-		雨控触发过程中无法手动执行清扫;
+		雨控的解除时间修改为持续检测1个小时没有雨控再解除;
 	2. 工作流程优化,震动之后进入收集模式,拍照清扫并行执行,工作状态下拍照后自动执行清扫;
+	3. 修复测试模式频繁开关上下仓门会导致开启或者关闭不完全的情况;
+	4. 启用交流供电 常加热;
+	5. 中端款和低端款做区别,使用vtype字段,vtype=43中端款,
 # 2025-07-31 更新说明
 	1. 优化DTU串口发送
 	2. 雨控触发立即关闭上仓门