zhunk 4 miesięcy temu
rodzic
commit
e8d1bbd709

+ 1 - 0
Application_cbd_apm32f1/applications/control.c

@@ -476,6 +476,7 @@ static void Check_gaoya_thread_entry(void *parameter)
             LOG_I("高压触发:[%d,%d]",gaoya_value1,gaoya_value2);
             rt_thread_delay(1000);
             ctr_clear();
+            device_status.gaoya_count++;   //2026-07-02
         }
         if(gaoya_hand){
             gaoya_cnt ++;

+ 2 - 1
Application_cbd_apm32f1/applications/control.h

@@ -20,7 +20,7 @@
 #define ROBOT_EN         0            //定时重启:0关闭,1打开
 ////////////////////////////////////////////////////////////////
 
-#define VERSION  "3.8.6"
+#define VERSION  "3.9.6"
 
 extern rt_event_t event_485_play;
 
@@ -92,6 +92,7 @@ typedef struct  _packed
     uint8_t sensor_485_sta;         //485传感器
     uint8_t yc_ct;                //诱虫次数
     uint8_t all_ycct;             //诱虫计数
+    uint8_t gaoya_count;          //高压计数
     uint8_t InsectSpecies;        //昆虫种类
     uint8_t Power_Type;           //供电类型
     uint8_t camera_sta;           //拍照报警

+ 5 - 0
Application_cbd_apm32f1/applications/dtu_uart2.c

@@ -758,6 +758,11 @@ char * makeJson()
         if(device_status.all_ycct>=10){
             device_status.all_ycct = device_status.all_ycct / 10;
         }
+        if(device_status.all_ycct==0&&device_status.gaoya_count!=0)
+        {
+            device_status.all_ycct = device_status.gaoya_count;
+            device_status.gaoya_count = 0;
+        }
     }
     rt_sprintf(utos, "%d",device_status.all_ycct);
     cJSON_AddStringToObject(pSubJson,"volt_ct",utos);

+ 4 - 1
Application_cbd_apm32f1/applications/hmi.c

@@ -371,7 +371,10 @@ static void HMI_Decode(void)
             //
             HMI_WRITE("menu.t4.txt=\"%d:00-%d:00\"",device_status.startBar,device_status.stopBar);
             //
-            HMI_WRITE("menu.ct.txt=\"%d\"",device_status.all_ycct);
+            if(device_status.all_ycct!=0)
+                HMI_WRITE("menu.ct.txt=\"%d\"",device_status.all_ycct);
+            if(device_status.gaoya_count!=0)
+                HMI_WRITE("menu.ct.txt=\"%d\"",device_status.gaoya_count);
             //
             HMI_WRITE("menu.version.txt=\"%s\"",device_status.driver);
             HMI_WRITE("menu.build.txt=\"%s\"",device_status.driver_compile);

+ 4 - 0
Application_cbd_apm32f1/readme.md

@@ -1,3 +1,7 @@
+# 2026-07-02 更新说明
+	#版本:3.9.6
+	1、针对光栅持续不计数,使用高压计数;
+		如果光栅计数为0,高压计数不为0,上报高压计数,屏幕显示也是一样;
 # 2026-06-25 更新说明
 	#版本:3.8.6
 	1、开启雨控检测,设备带雨控