zhunk 8 месяцев назад
Родитель
Сommit
305551b307

+ 10 - 0
Application_cbd_apm32f1/applications/control.c

@@ -462,6 +462,7 @@ static void Check_gaoya_thread_entry(void *parameter)
 {
     static int gaoya_value1 = 0;
     static int gaoya_value2 = 0;
+    static uint32_t gaoya_cnt = 0;
     gaoya_hand = FALSE;
     while(1)
     {
@@ -470,11 +471,20 @@ static void Check_gaoya_thread_entry(void *parameter)
         gaoya_value2 = Read_Fuse_Voltage();
         if(gaoya_value2-gaoya_value1>50)
         {
+            gaoya_cnt = 0;
             gaoya_hand = TRUE;
             LOG_I("高压触发:[%d,%d]",gaoya_value1,gaoya_value2);
             rt_thread_delay(1000);
             ctr_clear();
         }
+        if(gaoya_hand){
+            gaoya_cnt ++;
+            if(gaoya_cnt==20*25)
+            {
+                gaoya_cnt = 0;
+                gaoya_hand = false;
+            }
+        }
     }
 }
 

+ 1 - 1
Application_cbd_apm32f1/applications/control.h

@@ -20,7 +20,7 @@
 
 ////////////////////////////////////////////////////////////////
 
-#define VERSION  "3.5.3"
+#define VERSION  "3.6.4"
 
 extern rt_event_t event_485_play;
 

+ 19 - 23
Application_cbd_apm32f1/applications/hmi.c

@@ -335,18 +335,13 @@ static void HMI_Decode(void)
             HMI_WRITE("workSta.csq_value.txt=\"%s\"",device_status.csq);
             //更新收集时间
             HMI_WRITE("sysSet.stime.val=%d",device_status.cul_time);
-            //更新加热时间
-            HMI_WRITE("workSta.heatTime.val=%d",device_status.heattime);
-            HMI_WRITE("sysSet.jtime.val=%d",device_status.heattime);
+            //更新低温阈值
+            HMI_WRITE("sysSet.tpl.val=%d",device_status.tpl+20);
             HMI_WRITE("sysSet.cb0.val=%d",device_status.sleep_mode);
             //
             HMI_WRITE("sysSet.vol.val=%d",device_status.vol);
-            //更新加热时间和温度
-            HMI_WRITE("workSta.heatTem.val=%d",device_status.heattem);
-            HMI_WRITE("sysSet.jheat.val=%d",device_status.heatvalue);
-            //更新加热状态
-            HMI_WRITE("workSta.heatStatus.val=%d",device_status.heat_status);
-
+            //更新高温阈值
+            HMI_WRITE("sysSet.tph.val=%d",device_status.tph);
             //更新密码
             HMI_WRITE("inputPasswd.pwdData.txt=\"8888\"");
             //更新时间设置中的参数
@@ -645,38 +640,39 @@ static void HMI_Decode(void)
         rt_kprintf("工作时间参数已保存:模式-%d,光控时间-%d,时控开始时间-%d,时控结束时间-%d\n",device_status.timeSwitch,device_status.sunBar,device_status.startBar,device_status.stopBar);
     }
     else if (strstr(rx_buffer,"saveSystemSet")!=NULL) {
-        static char clt_time_str[3],heattime_str[3],heatvale_str[4],vol_str[4],thsp_str[5];
-        LOG_I("系统设置!");
+        static char clt_time_str[3],tpl_str[3],tph_str[4],vol_str[4],thsp_str[5];
+        LOG_I("系统设置:%s",rx_buffer);
         var = strstr(rx_buffer,"=");
         var ++;
         strncpy(clt_time_str,var,2);
         if(atoi(clt_time_str)>0 && atoi(clt_time_str) <= 240)
         {
+            LOG_I("设置收集时间:%d",atoi(clt_time_str));
             device_status.cul_time = atoi(clt_time_str); //收集时间
             ef_set_env_blob("cul_time", &device_status.cul_time, sizeof(device_status.cul_time));
         }
-        strncpy(heattime_str,var+2,2);
-        if(atoi(heattime_str)>0 && atoi(heattime_str) <= 30)
+        strncpy(tpl_str,var+2,3);
+        if(atoi(tpl_str)>=-20 && atoi(tpl_str) <= 20)
         {
-            device_status.heattime = atoi(heattime_str); //加热时间
-            LOG_I("设置加热时间:%d",atoi(heattime_str));
-            ef_set_env_blob("jtime", &device_status.heattime, sizeof(device_status.heattime));
+            device_status.tpl = atoi(tpl_str); //低温阈值
+            LOG_I("设置低温阈值:%d",atoi(tpl_str));
+            ef_set_env_blob("tpl", &device_status.tpl, sizeof(device_status.tpl));
         }
-        strncpy(heatvale_str,var+4,3);
-        if(atoi(heatvale_str) > 0 && atoi(heatvale_str) <= 130)
+        strncpy(tph_str,var+5,3);
+        if(atoi(tph_str) > 0 && atoi(tph_str) <= 70)
         {
-            device_status.heatvalue=atoi(heatvale_str);
-            LOG_I("设置加热温度:%d",device_status.heatvalue);
-            ef_set_env_blob("jheat", &device_status.heatvalue, sizeof(device_status.heatvalue));
+            device_status.tph=atoi(tph_str);
+            LOG_I("设置高温阈值:%d",device_status.tph);
+            ef_set_env_blob("tph", &device_status.tph, sizeof(device_status.tph));
         }
-        strncpy(vol_str,var+7,3);
+        strncpy(vol_str,var+8,3);
         if(atoi(vol_str)>0&&atoi(vol_str)<8)
         {
             device_status.vol = atoi(vol_str);   //音量
             LOG_I("设置音量:%d",device_status.vol);
             //DTU_Write("volume=");
         }
-        strncpy(thsp_str,var+10,4);
+        strncpy(thsp_str,var+11,4);
         if(atoi(thsp_str)>0&&atoi(thsp_str)<3600)
         {
             device_status.thsp = atoi(thsp_str);  //熄屏时间

+ 1 - 1
Application_cbd_apm32f1/applications/sht30_collect.c

@@ -249,7 +249,7 @@ static void Power_ReadCheck(void *parameter)
                 //雨控消抖,1分钟
                 if(rain_cnt%10==0)
                     LOG_D("rain_cnt:%d-value:%d",rain_cnt,Read_Rain_Voltage());
-                if(rain_cnt==600&&Read_Rain_Voltage()<250)
+                if(rain_cnt==600&&Read_Rain_Voltage()<250)  //5分钟
                 {
                     rain_cnt = 0;
                     device_status.rain_status = 0;

+ 5 - 0
Application_cbd_apm32f1/readme.md

@@ -1,3 +1,8 @@
+# 2026-03-18 更新说明
+	#版本:3.6.4
+	高压到光栅的触发增加超时时间30s;
+	版本:3.6.3
+	增肌屏幕设置高低温阈值
 # 2026-03-14 更新说明
 	版本:3.5.3
 	1. 修复常休眠模式,唤醒后上报两条数据的问题;