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

+ 1 - 0
Application_cbd_apm32f1/applications/control.c

@@ -719,6 +719,7 @@ void ctr_Petroleum_jelly(rt_uint32_t delay)
 //1.0转仓
 void turnzp(void)
 {
+    LOG_W("转仓执行!");
     static uint16_t turn_timeout = 0;
 //    rt_pin_mode(CLEAR_R, PIN_MODE_OUTPUT);
 //    rt_pin_mode(CLEAR_L, PIN_MODE_OUTPUT);

+ 1 - 1
Application_cbd_apm32f1/applications/control.h

@@ -19,7 +19,7 @@
 #define LAMP_EN          0             //李新3灯管:0关闭,1打开
 #define PCB_V1           1             //1-旧PCB,0-新PCB(模块化)
 #define MATCH_DEVICE     0             //比赛设备
-#define SENSOR_EN        1             //温湿度:0关闭,1打开
+#define SENSOR_EN        0             //温湿度:0关闭,1打开
 #define UART_TEST_EN     0             ///串口测试0-关闭,1-启用
 #define TG_MODULE        0             //推杆电机结构模块化控制
 #define DINGZHI_0722     0             //控制一个电机每天12点20工作12秒

+ 8 - 18
Application_cbd_apm32f1/applications/dtu_uart2.c

@@ -235,14 +235,14 @@ static void dtu_thread_entry_recv(void *parameter)
             rx_length = rt_device_read(msg.dev, 0, &rx_buffer[0], rx_length);
             rx_buffer[rx_length] = '\0';
             LOG_D("recv data:%s",rx_buffer);
-            if(strstr(rx_buffer,"{")==RT_NULL||strstr(rx_buffer,"}")==RT_NULL)
-            {
-                if(device_status.dtype==3)
-                {
-                    HMI_WRITE("sysSet.va0.txt=\"%s\"",rx_buffer);
-                    rt_timer_stop(timer_uart2);
-                }
-            }
+//            if(strstr(rx_buffer,"{")==RT_NULL||strstr(rx_buffer,"}")==RT_NULL)
+//            {
+//                if(device_status.dtype==3)
+//                {
+//                    HMI_WRITE("sysSet.va0.txt=\"%s\"",rx_buffer);
+//                    rt_timer_stop(timer_uart2);
+//                }
+//            }
             device_status.C01 &= ~(1<<13);   //通信 正常
             //过滤异常数据
             char str_check_head[2];
@@ -1864,17 +1864,7 @@ int parseDtu(char *json_string)
                   cJSON *tfcard_sta = cJSON_GetObjectItem(item_ext,"tfcard_sta");
                   //如果DTU的IMEI和FLash中的不一样,保存到FLASH
                   value_commn = cJSON_GetObjectItem(item_ext,"photo_sta");
-                  if(tfcard_sta!=NULL)
-                  {
-                      if(atoi(tfcard_sta->valuestring)==0){
-                          HMI_WRITE("menu.t0.txt=\"TF卡在位\"");
-                      }else if(atoi(tfcard_sta->valuestring)==1){
-                          HMI_WRITE("menu.t0.txt=\"TF卡未识别\"");
-                      }else if(atoi(tfcard_sta->valuestring)==2){
-                          HMI_WRITE("menu.t0.txt=\"TF卡异常\"");
-                      }
 
-                  }
                   if(photo_sta!=NULL){
                       device_status.camsta = photo_sta->valueint;
                       LOG_I("相机状态:%d",device_status.camsta);

+ 0 - 24
Application_cbd_apm32f1/applications/hmi.c

@@ -402,30 +402,6 @@ static void HMI_Decode(void)
         device_status.photo_ws = 1;
         #endif
     }
-    //转盘复位
-    else if (strstr(rx_buffer,"turn_init")!=NULL) {
-        LOG_I("转仓复位!");
-        ctr_turn(0,0);
-    }
-    //转盘
-    else if (strstr(rx_buffer,"turn")!=NULL) {
-        LOG_I("转仓!");
-        ctr_turn(90,0);
-    }
-    //打开电磁阀
-    else if (strstr(rx_buffer,"putTest.switchDrop=1")!=NULL) {
-        LOG_I("开始滴液!");
-        #if Color_EN == 1
-        device_status.run_sta = 5;
-        #else
-        ctr_shake(ON, device_status.shake_sec);
-        #endif
-    }
-    //关闭电磁阀
-    else if (strstr(rx_buffer,"putTest.switchDrop=0")!=NULL) {
-        LOG_I("停止滴液!");
-        ctr_shake(OFF, 0);
-    }
     //打开补光
     else if (strstr(rx_buffer,"putTest.switchLed=1")!=NULL) {
         LOG_I("打开补光!!");