zhunk 1 anno fa
parent
commit
fb266679a4

+ 5 - 22
Application_cbd_apm32f1/applications/control.c

@@ -455,8 +455,6 @@ uint8_t ctr_lamp(uint8_t status_lamp,uint8_t lamp_num)
 uint8_t ctr_shake(uint8_t status_shake,uint16_t shake_sec)
 {
     static rt_uint16_t shake_i = 0;
-    shake_i = atoi(device_status.power);
-    LOG_I("震动电机待机电流:%d",shake_i);
     if(device_status.dtype==7&&shake_sec!=0)
         DTU_Write("drop");
     rt_pin_mode(SHAKE_SW, PIN_MODE_OUTPUT);
@@ -466,29 +464,14 @@ uint8_t ctr_shake(uint8_t status_shake,uint16_t shake_sec)
     #endif
     if(status_shake==ON&&device_status.shake_ws==1)
     {
-        #if 0
-        for(int8_t s = 0;s++;s<2)
-        {
-            rt_pin_write(SHAKE_SW,ON);
-            rt_thread_delay(100);
-            rt_pin_write(SHAKE_SW,OFF);
-            rt_thread_delay(1000);
-        }
-        #endif
-
-        rt_pin_write(SHAKE_SW,ON);
         if(device_status.dtype==3)
         {
             while(shake_sec--)
             {
-                rt_thread_delay(100);
-                if(shake_sec==20&&device_status.clear_status==0&&device_status.work_status==1&&atoi(device_status.power)-shake_i<100&&shake_i!=0&&shake_i<5000)
-                {
-                    char * shake_warn = makeJson_Warn("电流不足", "震动电机");
-                    DTU_Write("%s",shake_warn);
-                    rt_free(shake_warn);
-                }
-                LOG_D("震动电机:%d",atoi(device_status.power));
+                rt_pin_write(SHAKE_SW,ON);
+                rt_thread_delay(50);
+                rt_pin_write(SHAKE_SW,OFF);
+                rt_thread_delay(1000);
             }
         }
         if(device_status.dtype==7)  rt_thread_delay(shake_sec*1000);
@@ -2174,7 +2157,7 @@ static void Control_Check_thread_entry(void *parameter)
             }else {
                 process = 0;
                 current_second = 0;
-#if 0
+#if MATCH_DEVICE == 1
                 if(device_status.rain_status==0)
                 {
                     rt_pin_mode(LED_P, PIN_MODE_OUTPUT);

+ 2 - 0
Application_cbd_apm32f1/readme.md

@@ -1,4 +1,6 @@
 #define VERSION_HK_2000W    "2.29.4(2000W)"         //4.0水稻 
+	震动的模式修改,基准时间50s,间隔1000ms;
+#define VERSION_HK_2000W    "2.29.4(2000W)"         //4.0水稻 
 	中端款定制8位转仓;
 #define VERSION_HK_2000W    "2.28.4(2000W)"         //4.0水稻 
 	1. 修复在备用电池安装的情况下断电再重启,控制板串口发送数据异常;