yf_zjb 3 年之前
父節點
當前提交
0e97dff5b6
共有 40 個文件被更改,包括 3430 次插入 和 3684 次删除
  1. 12 13
      Application_CBD/.config
  2. 13 14
      Application_CBD/.config.old
  3. 二進制
      Application_CBD/.settings/.rtmenus
  4. 二進制
      Application_CBD/Debug/Application_CBD.bin
  5. 二進制
      Application_CBD/Debug/Application_CBD.elf
  6. 3021 3032
      Application_CBD/Debug/Application_CBD.map
  7. 二進制
      Application_CBD/Debug/Application_CBD.rbl
  8. 二進制
      Application_CBD/Debug/applications/beep.o
  9. 二進制
      Application_CBD/Debug/applications/control.o
  10. 二進制
      Application_CBD/Debug/applications/dtu_uart2.o
  11. 二進制
      Application_CBD/Debug/applications/hmi.o
  12. 二進制
      Application_CBD/Debug/applications/main.o
  13. 二進制
      Application_CBD/Debug/applications/sample_mb_master.o
  14. 二進制
      Application_CBD/Debug/applications/sht30_collect.o
  15. 二進制
      Application_CBD/Debug/drivers/board.o
  16. 0 8
      Application_CBD/Debug/packages/freemodbus-latest/samples/subdir.mk
  17. 0 19
      Application_CBD/Debug/rt-thread/components/utilities/ulog/backend/subdir.mk
  18. 0 19
      Application_CBD/Debug/rt-thread/components/utilities/ulog/subdir.mk
  19. 0 19
      Application_CBD/Debug/rt-thread/components/utilities/ulog/syslog/subdir.mk
  20. 二進制
      Application_CBD/Debug/rt-thread/src/kservice.o
  21. 二進制
      Application_CBD/Debug/rtthread.rbl
  22. 193 51
      Application_CBD/applications/control.c
  23. 9 5
      Application_CBD/applications/control.h
  24. 69 17
      Application_CBD/applications/dtu_uart2.c
  25. 92 59
      Application_CBD/applications/hmi.c
  26. 1 1
      Application_CBD/drivers/board.c
  27. 7 1
      Application_CBD/packages/pkgs_error.json
  28. 0 52
      Application_CBD/packages/sht3x-latest/.gitignore
  29. 0 202
      Application_CBD/packages/sht3x-latest/LICENSE
  30. 0 166
      Application_CBD/packages/sht3x-latest/docs/api.md
  31. 9 0
      Application_CBD/readme.md
  32. 3 1
      Application_CBD/rt-thread/src/kservice.c
  33. 二進制
      Application_CBD/rt-thread/tools/building.pyc
  34. 二進制
      Application_CBD/rt-thread/tools/eclipse.pyc
  35. 二進制
      Application_CBD/rt-thread/tools/menuconfig.pyc
  36. 二進制
      Application_CBD/rt-thread/tools/mkdist.pyc
  37. 二進制
      Application_CBD/rt-thread/tools/utils.pyc
  38. 1 5
      Application_CBD/rtconfig.h
  39. 二進制
      Application_CBD/rtconfig.pyc
  40. 二進制
      Application_CBD_LED/.settings/.rtmenus

+ 12 - 13
Application_CBD/.config

@@ -351,6 +351,7 @@ CONFIG_PKG_OTA_DOWNLOADER_VER="latest"
 # CONFIG_PKG_USING_NET_SERVER is not set
 # CONFIG_PKG_USING_ZFTP is not set
 # CONFIG_PKG_USING_WOL is not set
+# CONFIG_PKG_USING_ZEPHYR_POLLING is not set
 # end of IoT - internet of things
 
 #
@@ -375,10 +376,10 @@ CONFIG_PKG_USING_CJSON=y
 CONFIG_PKG_CJSON_PATH="/packages/language/JSON/cJSON"
 # CONFIG_PKG_USING_CJSON_V1715 is not set
 # CONFIG_PKG_USING_CJSON_V1714 is not set
-# CONFIG_PKG_USING_CJSON_V159 is not set
+CONFIG_PKG_USING_CJSON_V159=y
 # CONFIG_PKG_USING_CJSON_V102 is not set
-CONFIG_PKG_USING_CJSON_LATEST_VERSION=y
-CONFIG_PKG_CJSON_VER="latest"
+# CONFIG_PKG_USING_CJSON_LATEST_VERSION is not set
+CONFIG_PKG_CJSON_VER="v1.5.9"
 # CONFIG_PKG_USING_LJSON is not set
 # CONFIG_PKG_USING_RT_CJSON_TOOLS is not set
 # CONFIG_PKG_USING_RAPIDJSON is not set
@@ -434,18 +435,11 @@ CONFIG_PKG_CJSON_VER="latest"
 # CONFIG_PKG_USING_MP3PLAYER is not set
 # CONFIG_PKG_USING_TINYJPEG is not set
 # CONFIG_PKG_USING_UGUI is not set
-
-#
-# PainterEngine: A cross-platform graphics application framework written in C language
-#
-# CONFIG_PKG_USING_PAINTERENGINE is not set
-# CONFIG_PKG_USING_PAINTERENGINE_AUX is not set
-# end of PainterEngine: A cross-platform graphics application framework written in C language
-
 # CONFIG_PKG_USING_MCURSES is not set
 # CONFIG_PKG_USING_VT100 is not set
 # CONFIG_PKG_USING_QRCODE is not set
 # CONFIG_PKG_USING_GUIENGINE is not set
+# CONFIG_PKG_USING_3GPP_AMRNB is not set
 # end of multimedia packages
 
 #
@@ -478,6 +472,7 @@ CONFIG_PKG_EASYFLASH_VER_NUM=0x99999
 # CONFIG_PKG_USING_EASYLOGGER is not set
 # CONFIG_PKG_USING_SYSTEMVIEW is not set
 # CONFIG_PKG_USING_SEGGER_RTT is not set
+# CONFIG_PKG_USING_RTT_AUTO_EXE_CMD is not set
 # CONFIG_PKG_USING_RDB is not set
 # CONFIG_PKG_USING_ULOG_EASYFLASH is not set
 # CONFIG_PKG_USING_ULOG_FILE is not set
@@ -516,6 +511,7 @@ CONFIG_PKG_EASYFLASH_VER_NUM=0x99999
 # CONFIG_PKG_USING_HASH_MATCH is not set
 # CONFIG_PKG_USING_ARMV7M_DWT_TOOL is not set
 # CONFIG_PKG_USING_VOFA_PLUS is not set
+# CONFIG_PKG_USING_RT_TRACE is not set
 # end of tools packages
 
 #
@@ -627,6 +623,7 @@ CONFIG_PKG_SYSWATCH_VER="latest"
 # CONFIG_PKG_USING_QPC is not set
 # CONFIG_PKG_USING_AGILE_UPGRADE is not set
 # CONFIG_PKG_USING_FLASH_BLOB is not set
+# CONFIG_PKG_USING_MLIBC is not set
 # end of system packages
 
 #
@@ -703,6 +700,7 @@ CONFIG_PKG_SHT3X_VER="latest"
 # CONFIG_PKG_USING_CW2015 is not set
 # CONFIG_PKG_USING_ICM20608 is not set
 # CONFIG_PKG_USING_PAJ7620 is not set
+# CONFIG_PKG_USING_STHS34PF80 is not set
 # end of sensors drivers
 
 #
@@ -793,13 +791,13 @@ CONFIG_PKG_LEDBLINK_VER="latest"
 # CONFIG_PKG_USING_MISAKA_AT24CXX is not set
 # CONFIG_PKG_USING_MISAKA_RGB_BLING is not set
 # CONFIG_PKG_USING_LORA_MODEM_DRIVER is not set
-# CONFIG_PKG_USING_BL_MCU_SDK is not set
 # CONFIG_PKG_USING_SOFT_SERIAL is not set
 # CONFIG_PKG_USING_MB85RS16 is not set
 # CONFIG_PKG_USING_RFM300 is not set
 # CONFIG_PKG_USING_IO_INPUT_FILTER is not set
 # CONFIG_PKG_USING_RASPBERRYPI_PICO_SDK is not set
 # CONFIG_PKG_USING_LRF_NV7LIDAR is not set
+# CONFIG_PKG_USING_AIP650 is not set
 # CONFIG_PKG_USING_FINGERPRINT is not set
 # end of peripheral libraries and drivers
 
@@ -822,6 +820,7 @@ CONFIG_PKG_LEDBLINK_VER="latest"
 #
 # CONFIG_PKG_USING_FIRE_PID_CURVE is not set
 # CONFIG_PKG_USING_UKAL is not set
+# CONFIG_PKG_USING_DIGITALCTRL is not set
 # end of Signal Processing and Control Algorithm Packages
 
 #
@@ -855,6 +854,7 @@ CONFIG_PKG_LEDBLINK_VER="latest"
 # CONFIG_PKG_USING_TETRIS is not set
 # CONFIG_PKG_USING_DONUT is not set
 # CONFIG_PKG_USING_COWSAY is not set
+# CONFIG_PKG_USING_MORSE is not set
 # end of entertainment: terminal games and other interesting software packages
 
 # CONFIG_PKG_USING_LIBCSV is not set
@@ -872,7 +872,6 @@ CONFIG_PKG_LEDBLINK_VER="latest"
 # CONFIG_PKG_USING_DSTR is not set
 # CONFIG_PKG_USING_TINYFRAME is not set
 # CONFIG_PKG_USING_KENDRYTE_DEMO is not set
-# CONFIG_PKG_USING_DIGITALCTRL is not set
 # CONFIG_PKG_USING_UPACKER is not set
 # CONFIG_PKG_USING_UPARAM is not set
 # CONFIG_PKG_USING_HELLO is not set

+ 13 - 14
Application_CBD/.config.old

@@ -69,7 +69,7 @@ CONFIG_ARCH_ARM_CORTEX_M3=y
 #
 CONFIG_RT_USING_COMPONENTS_INIT=y
 CONFIG_RT_USING_USER_MAIN=y
-CONFIG_RT_MAIN_THREAD_STACK_SIZE=4096
+CONFIG_RT_MAIN_THREAD_STACK_SIZE=2048
 CONFIG_RT_MAIN_THREAD_PRIORITY=10
 
 #
@@ -351,6 +351,7 @@ CONFIG_PKG_OTA_DOWNLOADER_VER="latest"
 # CONFIG_PKG_USING_NET_SERVER is not set
 # CONFIG_PKG_USING_ZFTP is not set
 # CONFIG_PKG_USING_WOL is not set
+# CONFIG_PKG_USING_ZEPHYR_POLLING is not set
 # end of IoT - internet of things
 
 #
@@ -373,12 +374,12 @@ CONFIG_PKG_OTA_DOWNLOADER_VER="latest"
 #
 CONFIG_PKG_USING_CJSON=y
 CONFIG_PKG_CJSON_PATH="/packages/language/JSON/cJSON"
-# CONFIG_PKG_USING_CJSON_V1715 is not set
+CONFIG_PKG_USING_CJSON_V1715=y
 # CONFIG_PKG_USING_CJSON_V1714 is not set
 # CONFIG_PKG_USING_CJSON_V159 is not set
 # CONFIG_PKG_USING_CJSON_V102 is not set
-CONFIG_PKG_USING_CJSON_LATEST_VERSION=y
-CONFIG_PKG_CJSON_VER="latest"
+# CONFIG_PKG_USING_CJSON_LATEST_VERSION is not set
+CONFIG_PKG_CJSON_VER="v1.7.15"
 # CONFIG_PKG_USING_LJSON is not set
 # CONFIG_PKG_USING_RT_CJSON_TOOLS is not set
 # CONFIG_PKG_USING_RAPIDJSON is not set
@@ -434,18 +435,11 @@ CONFIG_PKG_CJSON_VER="latest"
 # CONFIG_PKG_USING_MP3PLAYER is not set
 # CONFIG_PKG_USING_TINYJPEG is not set
 # CONFIG_PKG_USING_UGUI is not set
-
-#
-# PainterEngine: A cross-platform graphics application framework written in C language
-#
-# CONFIG_PKG_USING_PAINTERENGINE is not set
-# CONFIG_PKG_USING_PAINTERENGINE_AUX is not set
-# end of PainterEngine: A cross-platform graphics application framework written in C language
-
 # CONFIG_PKG_USING_MCURSES is not set
 # CONFIG_PKG_USING_VT100 is not set
 # CONFIG_PKG_USING_QRCODE is not set
 # CONFIG_PKG_USING_GUIENGINE is not set
+# CONFIG_PKG_USING_3GPP_AMRNB is not set
 # end of multimedia packages
 
 #
@@ -478,6 +472,7 @@ CONFIG_PKG_EASYFLASH_VER_NUM=0x99999
 # CONFIG_PKG_USING_EASYLOGGER is not set
 # CONFIG_PKG_USING_SYSTEMVIEW is not set
 # CONFIG_PKG_USING_SEGGER_RTT is not set
+# CONFIG_PKG_USING_RTT_AUTO_EXE_CMD is not set
 # CONFIG_PKG_USING_RDB is not set
 # CONFIG_PKG_USING_ULOG_EASYFLASH is not set
 # CONFIG_PKG_USING_ULOG_FILE is not set
@@ -516,6 +511,7 @@ CONFIG_PKG_EASYFLASH_VER_NUM=0x99999
 # CONFIG_PKG_USING_HASH_MATCH is not set
 # CONFIG_PKG_USING_ARMV7M_DWT_TOOL is not set
 # CONFIG_PKG_USING_VOFA_PLUS is not set
+# CONFIG_PKG_USING_RT_TRACE is not set
 # end of tools packages
 
 #
@@ -627,6 +623,7 @@ CONFIG_PKG_SYSWATCH_VER="latest"
 # CONFIG_PKG_USING_QPC is not set
 # CONFIG_PKG_USING_AGILE_UPGRADE is not set
 # CONFIG_PKG_USING_FLASH_BLOB is not set
+# CONFIG_PKG_USING_MLIBC is not set
 # end of system packages
 
 #
@@ -703,6 +700,7 @@ CONFIG_PKG_SHT3X_VER="latest"
 # CONFIG_PKG_USING_CW2015 is not set
 # CONFIG_PKG_USING_ICM20608 is not set
 # CONFIG_PKG_USING_PAJ7620 is not set
+# CONFIG_PKG_USING_STHS34PF80 is not set
 # end of sensors drivers
 
 #
@@ -793,13 +791,13 @@ CONFIG_PKG_LEDBLINK_VER="latest"
 # CONFIG_PKG_USING_MISAKA_AT24CXX is not set
 # CONFIG_PKG_USING_MISAKA_RGB_BLING is not set
 # CONFIG_PKG_USING_LORA_MODEM_DRIVER is not set
-# CONFIG_PKG_USING_BL_MCU_SDK is not set
 # CONFIG_PKG_USING_SOFT_SERIAL is not set
 # CONFIG_PKG_USING_MB85RS16 is not set
 # CONFIG_PKG_USING_RFM300 is not set
 # CONFIG_PKG_USING_IO_INPUT_FILTER is not set
 # CONFIG_PKG_USING_RASPBERRYPI_PICO_SDK is not set
 # CONFIG_PKG_USING_LRF_NV7LIDAR is not set
+# CONFIG_PKG_USING_AIP650 is not set
 # CONFIG_PKG_USING_FINGERPRINT is not set
 # end of peripheral libraries and drivers
 
@@ -822,6 +820,7 @@ CONFIG_PKG_LEDBLINK_VER="latest"
 #
 # CONFIG_PKG_USING_FIRE_PID_CURVE is not set
 # CONFIG_PKG_USING_UKAL is not set
+# CONFIG_PKG_USING_DIGITALCTRL is not set
 # end of Signal Processing and Control Algorithm Packages
 
 #
@@ -855,6 +854,7 @@ CONFIG_PKG_LEDBLINK_VER="latest"
 # CONFIG_PKG_USING_TETRIS is not set
 # CONFIG_PKG_USING_DONUT is not set
 # CONFIG_PKG_USING_COWSAY is not set
+# CONFIG_PKG_USING_MORSE is not set
 # end of entertainment: terminal games and other interesting software packages
 
 # CONFIG_PKG_USING_LIBCSV is not set
@@ -872,7 +872,6 @@ CONFIG_PKG_LEDBLINK_VER="latest"
 # CONFIG_PKG_USING_DSTR is not set
 # CONFIG_PKG_USING_TINYFRAME is not set
 # CONFIG_PKG_USING_KENDRYTE_DEMO is not set
-# CONFIG_PKG_USING_DIGITALCTRL is not set
 # CONFIG_PKG_USING_UPACKER is not set
 # CONFIG_PKG_USING_UPARAM is not set
 # CONFIG_PKG_USING_HELLO is not set

二進制
Application_CBD/.settings/.rtmenus


二進制
Application_CBD/Debug/Application_CBD.bin


二進制
Application_CBD/Debug/Application_CBD.elf


文件差異過大導致無法顯示
+ 3021 - 3032
Application_CBD/Debug/Application_CBD.map


二進制
Application_CBD/Debug/Application_CBD.rbl


二進制
Application_CBD/Debug/applications/beep.o


二進制
Application_CBD/Debug/applications/control.o


二進制
Application_CBD/Debug/applications/dtu_uart2.o


二進制
Application_CBD/Debug/applications/hmi.o


二進制
Application_CBD/Debug/applications/main.o


二進制
Application_CBD/Debug/applications/sample_mb_master.o


二進制
Application_CBD/Debug/applications/sht30_collect.o


二進制
Application_CBD/Debug/drivers/board.o


+ 0 - 8
Application_CBD/Debug/packages/freemodbus-latest/samples/subdir.mk

@@ -1,8 +0,0 @@
-################################################################################
-# 自动生成的文件。不要编辑!
-################################################################################
-
-# Add inputs and outputs from these tool invocations to the build variables 
-
-# Each subdirectory must supply rules for building sources it contributes
-

文件差異過大導致無法顯示
+ 0 - 19
Application_CBD/Debug/rt-thread/components/utilities/ulog/backend/subdir.mk


文件差異過大導致無法顯示
+ 0 - 19
Application_CBD/Debug/rt-thread/components/utilities/ulog/subdir.mk


文件差異過大導致無法顯示
+ 0 - 19
Application_CBD/Debug/rt-thread/components/utilities/ulog/syslog/subdir.mk


二進制
Application_CBD/Debug/rt-thread/src/kservice.o


二進制
Application_CBD/Debug/rtthread.rbl


+ 193 - 51
Application_CBD/applications/control.c

@@ -264,6 +264,28 @@ int ctr_Color_board(uint8_t forward,uint16_t time_board)
     return RESET;   //复位返回0
 }
 #endif
+/****************************5.0***********************************/
+void ctr_turnv5(void)
+{
+    rt_pin_mode(CLEAR_R, PIN_MODE_OUTPUT);
+    rt_pin_mode(CLEAR_L, PIN_MODE_OUTPUT);
+    // 转出
+    rt_pin_write(CLEAR_R,ON);
+    rt_pin_write(CLEAR_L,OFF);
+    rt_thread_mdelay(300);
+    //停止
+    rt_pin_write(CLEAR_R,OFF);
+    rt_pin_write(CLEAR_L,OFF);
+    rt_thread_mdelay(300);
+    //转入
+    rt_pin_write(CLEAR_R,OFF);
+    rt_pin_write(CLEAR_L,ON);
+    rt_thread_mdelay(300);
+    //停止
+    rt_pin_write(CLEAR_R,OFF);
+    rt_pin_write(CLEAR_L,OFF);
+    rt_thread_mdelay(300);
+}
 /**************************机器人********************************/
 void ctr_Motor_Robot(uint8_t status_ws)
 {
@@ -370,6 +392,19 @@ uint8_t ctr_Motor_xichong(uint8_t status_ws)
     }
     return 0;
 }
+
+uint8_t ctr_Camera_Power(uint8_t status_ws)
+{
+    rt_pin_mode(MOTOR1_CTR_PIN, PIN_MODE_OUTPUT);
+    if(status_ws==ON)
+    {
+        rt_pin_write(MOTOR1_CTR_PIN,ON);
+    }
+    else {
+        rt_pin_write(MOTOR1_CTR_PIN, OFF);
+    }
+    return 0;
+}
 //吸附电机
 uint8_t ctr_Motor_xifu(uint8_t status_ws)
 {
@@ -391,7 +426,7 @@ void ctr_JD_Clear(uint8_t shake_sw)
     ctr_cangmen_up(OFF);        //清扫传送带的电机
     if(shake_sw==ON)
     {
-        ctr_Motor_xifu(ON);
+        ctr_Heat(ON);   //清洁风机
         Motor_shake(ON, 0);
         ctr_cangmen_up(OPEN);   //打开清扫
     }
@@ -417,17 +452,18 @@ void ctr_JD_Clear(uint8_t shake_sw)
     Motor_shake(OFF, 1);
     Motor_Juandai(OFF);
     ctr_cangmen_up(OFF);    //关闭清扫
-    ctr_Motor_xifu(OFF);
+    ctr_Heat(OFF);
 }
 //工作任务流程
 void WorkTask_XCT(void)
 {
     while(device_status.work_status==1&&device_status.ds==1)
     {
-        ctr_Motor_xichong(ON);
-        //ctr_Motor_xifu(ON);
+
+        ctr_Motor_xifu(ON);
         //打开相机供电
-        ctr_Heat(ON);
+        ctr_Camera_Power(ON);
+        //ctr_Heat(ON);   //清洁风机
         uint32_t photo_fre = 0;
         photo_fre = device_status.dattim * 60;
         while(photo_fre!=0)
@@ -441,14 +477,14 @@ void WorkTask_XCT(void)
         //拍照
         HK_TakePhoto();
         //关闭吸附风机
-        ctr_Motor_xichong(OFF);
         ctr_Motor_xifu(OFF);
         //关闭相机供电
-        ctr_Heat(OFF);
+        //ctr_Heat(OFF);
+        ctr_Camera_Power(OFF);
         //卷带
         ctr_JD_Clear(ON);
-        rt_thread_delay(1000);
-        ctr_JD_Clear(ON);
+//        rt_thread_delay(1000);
+//        ctr_JD_Clear(ON);
         //震动
         Motor_shake(ON, device_status.shake_sec);
     }
@@ -735,6 +771,9 @@ 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);
@@ -742,7 +781,20 @@ uint8_t ctr_shake(uint8_t status_shake,uint16_t shake_sec)
     {
 
         rt_pin_write(SHAKE_SW,ON);
-        if(device_status.dtype==3)  rt_thread_delay(shake_sec*100);
+        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));
+            }
+        }
         if(device_status.dtype==7)  rt_thread_delay(shake_sec*1000);
         rt_pin_write(SHAKE_SW,OFF);
         HMI_WRITE("cangWei.switchShake.val=%d",0);
@@ -939,6 +991,8 @@ void ctr_Petroleum_jelly(rt_uint32_t delay)
 //1.0转仓
 void turnzp(void)
 {
+    static int16_t ect_zp = 0;
+    ect_zp = atoi(device_status.power);
     static uint16_t turn_timeout = 0;
 //    rt_pin_mode(CLEAR_R, PIN_MODE_OUTPUT);
 //    rt_pin_mode(CLEAR_L, PIN_MODE_OUTPUT);
@@ -956,7 +1010,17 @@ void turnzp(void)
             Motor_Juandai(ON);
             rt_thread_delay(50);
             turn_timeout++;
-            if(turn_timeout==600) break;
+            if(turn_timeout==600)
+            {
+                LOG_E("检测不到限位,电机强制停止");
+                if(device_status.work_status==1&&atoi(device_status.power)-ect_zp < 150&&ect_zp!=0&&ect_zp<5000)
+                {
+                    char *ctr_zp_limit_warn =makeJson_Warn("电流不足/限位超时","转盘电机");
+                    DTU_Write("%s",ctr_zp_limit_warn);
+                    rt_free(ctr_zp_limit_warn);
+                }
+                break;
+            }
         }
         break;
     }
@@ -968,9 +1032,20 @@ void turnzp(void)
 //            rt_pin_write(CLEAR_R,ON);
 //            rt_pin_write(CLEAR_L,OFF);
             Motor_Juandai(ON);
-            turn_timeout++;
             rt_thread_delay(50);
-            if(turn_timeout==600) break;
+            turn_timeout++;
+            if(turn_timeout==600)
+            {
+                LOG_E("检测不到离开限位,电机或者限位开关异常,电机强制停止");
+                if(device_status.work_status==1&&atoi(device_status.power)-ect_zp < 150&&ect_zp!=0&&ect_zp<5000)
+                {
+                    char *ctr_zp_limit_warn =makeJson_Warn("检测不到离开限位,电机未启动或者限位开关故障","转盘电机");
+                    DTU_Write("%s",ctr_zp_limit_warn);
+                    rt_free(ctr_zp_limit_warn);
+                }
+
+                break;
+            }
         }
         break;
     }
@@ -1001,6 +1076,7 @@ void turnzp(void)
 //新结构使用推杆电机做清扫
 uint8_t ctr_clear(uint16_t status_clear)
 {
+
     static uint16_t clear_num = 0;
     #if PWM_EN == 0
         rt_pin_mode(CLEAR_R, PIN_MODE_OUTPUT);
@@ -1235,6 +1311,9 @@ void ctr_router(uint8_t status_router)
 //清扫-推杆电机
 void ctr_TG_Clear(uint16_t clear_timeout)
 {
+    uint8_t err_clear = 0;
+    int16_t Electric_current = atoi(device_status.power);  //获取电机运动前的电流
+    LOG_I("清扫电机待机:%d",Electric_current);
     static uint16_t clear_count = 0;
     clear_count = clear_timeout;
     #if PWM_EN == 0
@@ -1251,6 +1330,21 @@ void ctr_TG_Clear(uint16_t clear_timeout)
              Motor_Qingsao_L_PWM(OFF);
         #endif
         clear_count--;
+        //5S后检测当前电流和清扫开始前的电流差值是否大于200mA
+        if(clear_count<350&&(atoi(device_status.power)-Electric_current)<150)
+        {
+            LOG_E("清扫电机电流不足!!!");
+            if(device_status.work_status==1&&device_status.up_status == 0&&device_status.down_status==0&&Electric_current!=0&&Electric_current<5000)
+            {
+                err_clear++;
+                if(err_clear==10)
+                {
+                    char *ctr_clear_warn = makeJson_Warn("电流不足","清扫电机");
+                    DTU_Write("%s",ctr_clear_warn);
+                    rt_free(ctr_clear_warn);
+                }
+            }
+        }
         rt_thread_delay(100);
     }
       #if PWM_EN == 0
@@ -1316,7 +1410,7 @@ void Hk_Take_io(void)
 
 void calorstat(uint16_t heat_time)
 {
-    uint8_t heat_up_cnt = 0;
+    //uint8_t heat_up_cnt = 0;
     uint16_t n = 0;
     uint16_t delay_heat = 60;
     FlagStatus heat_flg = RESET;
@@ -1343,16 +1437,17 @@ void calorstat(uint16_t heat_time)
         }
         if(device_status.heattem < (device_status.heatvalue - 5)&&heat_flg == SET)
         {
-            heat_up_cnt = 0;
+            device_status.run_sta = 0;
             ctr_Heat(ON);
         }
         else if (device_status.heattem>=device_status.heatvalue&&heat_flg==SET)
         {
-            if(heat_up_cnt==0)
-            {
-                UpLoad_Data();      //加热到设定温度的数据
-                heat_up_cnt = 1;
-            }
+//            if(heat_up_cnt==0)
+//            {
+//                UpLoad_Data();      //加热到设定温度的数据
+//                heat_up_cnt = 1;
+//            }
+            device_status.run_sta = 10;
             ctr_Heat(OFF);
         }
         if((n % 60)==0)
@@ -1418,7 +1513,6 @@ void HardWare_Init(uint8_t boot)
 //拍照
 void HK_TakePhoto(void)
 {
-    device_status.vol = 200;
     //打开补光灯
     DTU_Write("takephoto.mp3");
     rt_thread_delay(1000);
@@ -1448,7 +1542,6 @@ void HK_TakePhoto(void)
         rt_thread_delay(1000*19);
     }
     ctr_led(OFF);
-    device_status.vol = 0;
 }
 //光控测试任务
 void SunTest(void)
@@ -1503,10 +1596,13 @@ void ResetInit(void)
     {
         device_status.work_done = 1;
            //1.打开路由器供电
-           ctr_router(ON);
-           ctr_RTU_DTU(ON);
-           //2.打开相机供电
-           ctr_photo(ON);
+           if(device_status.power_status==1)
+           {
+               ctr_router(ON);
+               ctr_RTU_DTU(ON);
+               //2.打开相机供电
+               ctr_photo(ON);
+           }
            //3.关闭镇流器
            ctr_lamp(OFF,1);
            #if LAMP_EN == 1
@@ -1558,11 +1654,14 @@ void ResetInit(void)
            rt_thread_delay(1000);
     }
     else {
-        //1.打开路由器供电
-        ctr_router(ON);
-        ctr_RTU_DTU(ON);
-        //2.打开相机供电
-        ctr_photo(ON);
+        if(device_status.power_status==1)
+        {
+            //1.打开路由器供电
+            ctr_router(ON);
+            ctr_RTU_DTU(ON);
+            //2.打开相机供电
+            ctr_photo(ON);
+        }
         //5.关闭加热
         //6.关闭补光灯
         ctr_led(OFF);
@@ -1842,6 +1941,7 @@ void WorkCheck(void)
     device_status.work_status = 0;
     rt_thread_delay(1000);
 }
+
 void WorkTask_BZY(void)
 {
     if(device_status.ds==1)
@@ -2047,20 +2147,43 @@ void WorkTask_BZY(void)
     device_status.work_status = 0;          //待机
     LOG_W("==================!!!设备已待机!!!===================");
 }
+
+
+void WorkTask_BZYV2(void)
+{
+    //打开采集风机
+    ctr_Collect_Fan(ON);
+    //打开胶带步进电机
+
+    //等待采集结束
+
+    //拍照
+
+    //打开相机供电
+    //打开补光灯
+    //滑台归位
+    //滑台启动
+}
+
 //工作任务流程s
 void WorkTask(void)
 {
-    ctr_router(ON); //打开路由器供电
     static int clt_time = 0; //收集时间差秒数
     static int heat_time = 0;
-    static uint16_t controltime = 6;
     LOG_I("工作状态:%d",device_status.work_status);
     LOG_I("开关机状态:%d",device_status.ds);
-    while(device_status.work_status==1&&device_status.temp_status==0&&device_status.bat_status==0&&device_status.rain_status==0&&device_status.ds==1)
+    while(device_status.work_status==1&&device_status.temp_status==0&&device_status.bat_status==0&&device_status.rain_status==0&&device_status.ds==1&&device_status.clear_status==0)
     {
         device_status.work_done = 0;
         if(clt_time==0)
         {
+            if(device_status.version_type==4&&atoi(device_status.power)<400)
+            {
+                LOG_W("相机电流不足!");
+                char *ctr_hk_p_warn = makeJson_Warn("电流不足", "相机");
+                DTU_Write("%s",ctr_hk_p_warn);
+                rt_free(ctr_hk_p_warn);
+            }
             #if LAMP_EN == 0
             ctr_Fan_PUT(ON);
             #endif
@@ -2088,6 +2211,16 @@ void WorkTask(void)
             ctr_lamp(ON,1);
         #endif
         LOG_I("打开灯管!!!");
+        if(atoi(device_status.power)<500)
+        {
+            LOG_I("Current is:%d",atoi(device_status.power));
+            if(atoi(device_status.power)>50&&atoi(device_status.power)<5000)        //过滤电流检测芯片损坏导致电流异常
+            {
+                char* lamp_err_warn = makeJson_Warn("电流不足", "灯管");
+                DTU_Write("%s",lamp_err_warn);
+                rt_free(lamp_err_warn);
+            }
+        }
         if(device_status.version_type!=5)
         {
             rt_thread_delay(5000);  //待灯管启动再往下执行,否则会触发电机过流
@@ -2227,7 +2360,7 @@ void WorkTask(void)
             if(device_status.version_type==4||device_status.version_type==41)
             {
                 //震动
-                ctr_shake(ON, 1);
+                ctr_shake(ON, device_status.shake_sec);
                 //补光&&拍照
                 LOG_I("拍照!!!");
                 HMI_WRITE("workSta.g0.txt=\"拍照!\"");
@@ -2240,24 +2373,19 @@ void WorkTask(void)
         }
         else {
                     //打开高压
-
+                    ctr_Heat(ON);
                     //打开补光
                     ctr_led(ON);
-                    rt_kprintf("打开补光!!!\n");
+                    LOG_I("打开补光!!");
                     rt_pin_mode(CLEAR_L_LIMIT,PIN_MODE_INPUT);
                     //2.翻转清虫
-                    if (rt_pin_read(CLEAR_L_LIMIT)==0) //判断是否有触发信号
-                    {
-                      while(controltime!=0)
-                      {
-                       controltime--;
-                       rt_thread_delay(1000);
-                       rt_kprintf("延时中:%d\n",controltime);
-                      }
-                      controltime = 6;
-                      turnzp();  //翻转
-                      rt_kprintf("翻转清虫!!!\n");
-                    }
+                    while(rt_pin_read(CLEAR_L_LIMIT)==1)  rt_thread_delay(20);
+                    rt_thread_delay(500);
+                    Hk_Take_io();  //触发海康相机拍照
+                    rt_thread_delay(500);
+                    ctr_turnv5();  //摆动清虫
+                    LOG_I("摆动清虫!");
+
         }
    }
         if(device_status.bat_status == 1 || device_status.temp_status == 1|| device_status.rain_status==1||device_status.ds==0)
@@ -2322,7 +2450,6 @@ static void Work_Loop_thread_entry(void *parameter)
 /*入口函数清扫*/
 static void Control_Clear_thread_entry(void *parameter)
 {
-
     while(1)
     {
         #if ROBOT_EN ==1
@@ -2351,7 +2478,7 @@ static void Control_Clear_thread_entry(void *parameter)
 static void Control_Heat_thread_entry(void *parameter)
 {
 
-    uint16_t var_led,var_ledoff = 0;
+    uint16_t var_clear = 0;
     #if ROBOT_EN == 1
     static uint8_t key_on = 0;
     #else
@@ -2419,6 +2546,21 @@ static void Control_Heat_thread_entry(void *parameter)
         {
             LOG_I("Not calorstat!");
         }
+        if(device_status.work_status==1&&device_status.version_type==5)
+        {
+            var_clear++;
+            if(var_clear==300)
+            {
+                var_clear = 0;
+                ctr_cangmen_down(ON);
+                rt_thread_mdelay(5000);
+                ctr_cangmen_down(OFF);
+                rt_thread_mdelay(500);
+                ctr_cangmen_down(ON);
+                rt_thread_mdelay(5000);
+                ctr_cangmen_down(OFF);
+            }
+        }
 //        //吸虫塔补光灯测试
 //        while(device_status.vol!=200)
 //        {

+ 9 - 5
Application_CBD/applications/control.h

@@ -17,12 +17,13 @@
 #define LAMP_EN          0             //李新3灯管:0关闭,1打开
 #define SENSOR_EN        1              //温湿度:0关闭,1打开
 #define ROBOT_EN         0              //机器人
-#define Color_EN         0          //定制色诱
+#define Color_EN         0              //定制色诱
+#define BZYV2_EN         0              //孢子仪2.0
 ////////////////////////////////////////////////////////////////
 #if LAMP_EN == 1
-    #define VERSION_HK          "1.(3ledv5).41(HK)" //4.0海康-三色光源
+    #define VERSION_HK          "1.(3ledv6).41(HK)" //4.0海康-三色光源
 #else
-    #define VERSION_HK          "1.48.41(HK)"       //4.0海康-1200W
+    #define VERSION_HK          "1.49.41(HK)"       //4.0海康-1200W
 #endif
 #define VERSION_HK_4800W    "1.48.48(HK)"       //4.0海康-4800W
 #define VERSION_HK_2000W    "1.45.4(2000W)"         //4.0水稻
@@ -32,7 +33,7 @@
 #define VERSION_V5          "1.2.5(HK)"             //5.0
 #define VERSION_Robot       "1.0(robot)"            //展厅机器人
 
-#define VERSION_BZY         "2.4"                   //孢子仪
+#define VERSION_BZY         "2.3"                   //孢子仪
 
 #define CompileTime         rt_sprintf(device_status.driver_compile,"%s-%s",__DATE__,__TIME__)              //编译时间,每次更新代码修改
 /*********************************************************************/
@@ -155,7 +156,7 @@ typedef struct  _packed
 //雨控
 #define RAIN_PIN GET_PIN(C,1)
 //加热
-#define  Heat_Pin GET_PIN(B, 12)
+#define  Heat_Pin GET_PIN(B,12)
 //采集/上仓门
 #define  Collect_fan_R GET_PIN(C, 5)
 #define  Collect_fan_L GET_PIN(C, 4)
@@ -220,6 +221,9 @@ typedef struct  _packed
 void ctr_JD_Clear(uint8_t shake_sw);
 uint8_t ctr_Motor_xichong(uint8_t status_ws);
 uint8_t ctr_Motor_xifu(uint8_t status_ws);
+uint8_t ctr_Camera_Power(uint8_t status_ws);
+/*****************************5.0测报灯******************************/
+void ctr_turnv5(void);
 /*****************************孢子仪**********************************/
 //制冷
 #define Cold_Pin GET_PIN(B,11)

+ 69 - 17
Application_CBD/applications/dtu_uart2.c

@@ -168,26 +168,23 @@ static void dtu_thread_entry_recv(void *parameter)
          }
          else {
                     rx_err ++;
-                    if (rx_err < 54000)
-                    {
-                        ctr_RTU_DTU(ON);
-                        ctr_photo(ON);
-                        ctr_RTU_DTU(ON);
-                    }
-                    else if(rx_err==54000)//90分钟未接收到数据
+                    if(rx_err==54000)//90分钟未接收到数据
                     {
                         if(device_status.version_type==6)
                         {
-                            LOG_E("RK3399 transter Error!\n");
+                            LOG_E("RK3399 transter Error!");
                             ctr_photo(OFF);
                         }
                         else {
                             ctr_RTU_DTU(OFF);
                         }
                     }
-                    else if (rx_err==54100)
+                    else if (rx_err==54100&&device_status.bat_status==0)
                     {
+                        LOG_W("通信中断,RTU重新上电");
                         rx_err = 0;
+                        ctr_RTU_DTU(ON);
+                        ctr_photo(ON);
                     }
                }
             //rt_kprintf("%s\n",rx_json_buffer);
@@ -203,10 +200,24 @@ static void dtu_thread_entry_send(void *parameter)
     device_status.power_status = 1;
     device_status.num_updata = 0;
     rt_thread_delay(10000);
+    static rt_uint16_t wait_i = 0;
+    static rt_uint8_t check_i = 0;
+    static rt_uint8_t power_i = 0;
     while(1)
     {
         if(atoi(device_status.net)==0)
         {
+                if(device_status.rain_status==1||device_status.temp_status==1)
+                {
+                    if(check_i==0)
+                    {
+                        check_i = 1;
+                        device_status.num_updata = 0;
+                    }
+                }
+                else {
+                    check_i = 0;
+                }
                 if(device_status.num_updata!=0)
                 {
                     device_status.num_updata--;
@@ -216,18 +227,24 @@ static void dtu_thread_entry_send(void *parameter)
                         HMI_WRITE("sleep=%d",1);
                     }
                     //检测到电源掉电
-                    if(Read_Real_Voltage()/100<2&&device_status.power_status==1)
+                    if(atoi(device_status.voltage)==0&&device_status.power_status==1)
                     {
+                        power_i++;
                         //确定网络状态
-                        if(atoi(device_status.net)==0)
+                        if(power_i==10)
                         {
+                            rt_sprintf(device_status.net, "1");
+                            HMI_WRITE("sleep=%d",1);    //屏幕休眠
                             DTU_Write("%s",makeJson_Warn("power down","power"));
                             device_status.power_status = 0;
-                            rt_thread_delay(1500);
+                            rt_thread_delay(5000);
+                            ctr_router(OFF);
+                            ctr_RTU_DTU(OFF);
+                            power_i = 0;
                         }
                     }
                     else {
-                        //打开路由器和RTU供电
+                        power_i = 0;
                         ctr_router(ON);
                         ctr_RTU_DTU(ON);
                     }
@@ -254,7 +271,31 @@ static void dtu_thread_entry_send(void *parameter)
                 }
         }
     else {
-        rt_kprintf("wait connect internet......\n");
+            wait_i ++;
+            LOG_I("wait connect internet......%d",wait_i);
+            //检测到电源掉电
+            if(atoi(device_status.voltage)==0&&device_status.power_status==1&&wait_i>200)
+            {
+                check_i++;
+                LOG_W("断网状态下检测到设备断电!%d",atoi(device_status.voltage));
+                if(check_i==10)
+                {
+                    device_status.power_status = 0;
+                    rt_thread_delay(5000);
+                    ctr_router(OFF);
+                    ctr_RTU_DTU(OFF);
+                    check_i = 0;
+                }
+            }
+            if(Read_Real_Voltage()/100>12&&device_status.power_status==0)
+            {
+                check_i = 0;
+                LOG_I("电源恢复正常,打开路由器和RTU供电!");
+                device_status.power_status = 1;
+                //打开路由器和RTU供电
+                ctr_router(ON);
+                ctr_RTU_DTU(ON);
+            }
         }
     rt_thread_mdelay(1000);
     }
@@ -280,7 +321,7 @@ int dtu_data_play(void)
     dtu_send_data = rt_thread_create("DTU_Uart_thread_send",
                                     dtu_thread_entry_send,RT_NULL,
                                     DTU_THREAD_STACK_SIZE,
-                                    19,
+                                    3,                              //优先级高是为了保证数据上传的频率的精确度
                                     DTU_THREAD_TIMESLICE
             );
     /* 创建线程-指令接收解析*/
@@ -554,7 +595,14 @@ char * makeJson()
         rt_sprintf(utos, "%d",device_status.down_status);
         cJSON_AddStringToObject(pSubJson,"dnds",utos);
         //加热仓温度
-        rt_sprintf(utos, "%d",device_status.heattem);
+        if(device_status.run_sta==10)
+        {
+            device_status.run_sta = 0;
+            rt_sprintf(utos, "%d",device_status.heatvalue);
+        }
+        else {
+            rt_sprintf(utos, "%d",device_status.heattem);
+        }
         cJSON_AddStringToObject(pSubJson,"hrt",utos);
         //加热状态
         rt_sprintf(utos, "%d",device_status.heat_status);
@@ -1703,6 +1751,11 @@ int parseDtu(char *json_string)
                               {
                                   device_status.version_type = atoi(vt->valuestring);
                                   ef_set_env_blob("version_type", &device_status.version_type, sizeof(device_status.version_type));
+                                  if(device_status.version_type==7)
+                                  {
+                                      device_status.dtype = 7;
+                                      ef_set_env_blob("dtype", &device_status.dtype, sizeof(device_status.dtype));
+                                  }
                                   rt_kprintf("版本类型vt:%d\n",atoi(vt->valuestring));
                               }
                               else {
@@ -1741,7 +1794,6 @@ void UpLoad_Data(void)
     DTU_Write("%s",updata);
     #endif
     list_mem();
-    ctr_RTU_DTU(ON);
     //播放数据上传中语音
 }
 

+ 92 - 59
Application_CBD/applications/hmi.c

@@ -250,10 +250,7 @@ static void HMI_Decode(void)
         HMI_WRITE("workSta.heatStatus.val=%d",device_status.heat_status);
 
         //更新密码
-        static char pwd_char[10];
-        //整型转字符串
-        itoa(device_status.passWord,pwd_char,10);
-        HMI_WRITE("inputPasswd.pwdData.txt=\"%s\"",pwd_char);
+        HMI_WRITE("inputPasswd.pwdData.txt=\"8888\"");
         //更新时间设置中的参数
         //更新定时模式
         HMI_WRITE("clockSet.timeSwitch.val=%d",device_status.timeSwitch);
@@ -962,24 +959,22 @@ static void HMI_Decode(void)
         ctr_lamp(ON,1);
         device_status.sun_test = 1;
     }
-    else if (strstr(rx_buffer,"shakesec=")!=NULL)
+    else if (strstr(rx_buffer,"setshake_sec=")!=NULL)
     {
         static char shakesec_str[4];
-        rt_kprintf("震动时间设置!\n");
+        LOG_I("震动时间设置!");
         var = strstr(rx_buffer,"=");
         var ++;
-        strncpy(shakesec_str,var,3);
-        if(atoi(shakesec_str)>=1&&atoi(shakesec_str)<=1000)
+        strncpy(shakesec_str,var,2);
+        if(atoi(shakesec_str)>=0&&atoi(shakesec_str)<=10)
         {
-            device_status.shake_sec =atoi(shakesec_str); //
-            ef_set_env_blob("shake_sec", &device_status.shake_sec, sizeof(device_status.shake_sec));
-            MA_save();
+            device_status.shake_sec =atoi(shakesec_str)*10; //
         }
         else {
-            rt_kprintf("设置失败!!!\n");
+            LOG_E("设置失败!!!");
         }
         rt_free(var);
-        rt_kprintf("震动时间设置:%d\n",device_status.shake_sec);
+        LOG_D("震动时间设置:%d",device_status.shake_sec);
     }
     //切换大数据平台
     else if (strstr(rx_buffer,"8.136.98.49")!=NULL)
@@ -1251,13 +1246,14 @@ static void HMI_Decode(void)
 //入口函数-电机控制及
 static void Ctr_Mortor_entry(void* parameter)
 {
-   //rt_uint32_t limit_current = 3000;     //推杆电击限制电流1A
-   //rt_uint16_t power_current = 0;
+   rt_int16_t motor_current = 0;     //
    rt_uint16_t num_up_open = 200;    //20s
    rt_uint16_t num_up_close = 200;   //
    rt_uint16_t num_down_open = 200;  //
    rt_uint16_t num_down_close = 200;  //
    rt_int16_t photo_led_sec = 900;  //55S
+
+   uint8_t err_cnt = 0;
    /*孢子仪拍照数量*/
    rt_uint16_t photo_setup = 0;
    #if Color_EN ==1
@@ -1286,9 +1282,26 @@ static void Ctr_Mortor_entry(void* parameter)
         }
         if(device_status.ctr_up_motor==1)
         {
+            if(num_up_open==200&&device_status.clear_status==0&&device_status.work_status==1)
+            {
+                err_cnt = 0;
+                motor_current = atoi(device_status.power);
+                LOG_D("上仓门待机电流:%d",motor_current);
+            }
             //打开上仓门
             ctr_cangmen_up(OPEN);
             num_up_open--;
+            if(num_up_open<190&&device_status.clear_status==0&&device_status.work_status==1&&atoi(device_status.power)-motor_current<150&&motor_current!=0&&motor_current<5000)
+            {
+                LOG_E("上仓门电机电流不足!!!%d",err_cnt);
+                err_cnt++;
+                if(err_cnt==10)
+                {
+                    char * ctr_cm_up_warn = makeJson_Warn("电流不足,打开", "上仓门电机");
+                    DTU_Write("%s",ctr_cm_up_warn);
+                    rt_free(ctr_cm_up_warn);
+                }
+            }
             //如果未工作且上仓门电机电流大于1A,立即停止,记录到Flash,上报预警
             //2022-03-14-add:&&atoi(device_status.power)<8000
 //            if(atoi(device_status.power)>limit_current&&atoi(device_status.power)<8000)
@@ -1302,70 +1315,85 @@ static void Ctr_Mortor_entry(void* parameter)
                 ctr_cangmen_up(OFF);
                 num_up_open = 200;
             }
+            LOG_D("上仓门打开电流:%d",atoi(device_status.power));
         }
         else if(device_status.ctr_up_motor==2)
         {
+            if(num_up_close==200&&device_status.clear_status==0&&device_status.work_status==1)
+            {
+                err_cnt = 0;
+                motor_current = atoi(device_status.power);
+                LOG_D("上仓门待机电流:%d",motor_current);
+            }
             ctr_cangmen_up(CLOSE);
             num_up_close --;
-            //2022-03-14:&&atoi(device_status.power)<8000
-//            if(atoi(device_status.power)>limit_current&&atoi(device_status.power)<8000)
-//            {
-//                ctr_cangmen_up(OFF);
-//                num_up_close = 200;
-//                rt_kprintf("************************上仓门电机关闭堵转!!!**********************%d\n",atoi(device_status.power));
-//            }
+            if(num_up_close<190&&device_status.clear_status==0&&device_status.work_status==1&&atoi(device_status.power)-motor_current<150&&motor_current!=0&&motor_current<5000)
+            {
+                LOG_E("上仓门电机电流不足!!!%d",err_cnt);
+                err_cnt++;
+                if(err_cnt==10)
+                {
+                    char * ctr_cm_up_warn = makeJson_Warn("电流不足,关闭", "上仓门电机");
+                    DTU_Write("%s",ctr_cm_up_warn);
+                    rt_free(ctr_cm_up_warn);
+                }
+            }
 
             if (num_up_close == 0)
             {
                 ctr_cangmen_up(OFF);
                 num_up_close= 200;
             }
+            LOG_D("上仓门关闭电流:%d",atoi(device_status.power));
         }
         if (device_status.ctr_down_motor == 1)
         {
-//            if(num_down_open==200)
-//            {
-//                power_current = atoi(device_status.power);
-//            }
+            if(num_down_open==200&&device_status.clear_status==0&&device_status.work_status==1)
+            {
+                err_cnt = 0;
+                motor_current = atoi(device_status.power);
+                LOG_D("下仓门待机电流:%d",motor_current);
+            }
             ctr_cangmen_down(OPEN);
             num_down_open--;
-//            if(atoi(device_status.power)>limit_current)
-//            {
-//                ctr_cangmen_down(OFF);
-//                num_down_open = 200;
-//                rt_kprintf("*************************下仓门电机打开堵转!!!**********************%d\n",atoi(device_status.power));
-//            }
             //如果关闭仓门1S后检测不到电流增大,则判定为异常
-//            if (atoi(device_status.power)<(power_current+100)&&num_down_open==190&&device_status.work_status==1) {
-//                DTU_Write("%s",makeJson_Warn("Down Motor OPEN ERR","device_Down_TG"));
-//                rt_free(makeJson_Warn("Down Motor OPEN ERR","device_Down_TG"));
-//            }
+            if (num_down_open<190&&device_status.clear_status==0&&device_status.work_status==1&&atoi(device_status.power)-motor_current<150&&motor_current!=0&&motor_current<5000)
+            {
+                err_cnt++;
+                LOG_E("下仓门电机电流不足!!!");
+                if(err_cnt==10)
+                {
+                    char * ctr_cm_down_warn = makeJson_Warn("电流不足,打开", "下仓门电机");
+                    DTU_Write("%s",ctr_cm_down_warn);
+                    rt_free(ctr_cm_down_warn);
+                }
+            }
             if (num_down_open == 0)
             {
                 ctr_cangmen_down(OFF);
                 num_down_open = 200;
             }
+            LOG_D("下仓门打开电流:%d",atoi(device_status.power));
         }
         else if (device_status.ctr_down_motor == 2)
         {
-//            if(num_down_close==200)
-//            {
-//                power_current = atoi(device_status.power);
-//            }
+            if(num_down_close==200&&device_status.clear_status==0&&device_status.work_status==1)
+            {
+                err_cnt = 0;
+                motor_current = atoi(device_status.power);
+                LOG_D("下仓门待机电流:%d",motor_current);
+            }
             ctr_cangmen_down(CLOSE);
             num_down_close--;
-            //2022-03-14-add:&&atoi(device_status.power)<8000
-//            if(atoi(device_status.power)>limit_current&&atoi(device_status.power)<8000)
-//            {
-//                ctr_cangmen_down(OFF);
-//                num_down_close = 200;
-//                rt_kprintf("*************************下仓门电机关闭堵转!!!**********************%d\n",atoi(device_status.power));
-//            }
             //如果关闭仓门1S后检测不到电流增大,则判定为异常
-//            if (atoi(device_status.power)<(power_current+100)&&num_down_close==190&&device_status.work_status==1) {
-//                DTU_Write("%s",makeJson_Warn("Down Motor CLOSE ERR","device_Down_TG"));
-//                rt_free(makeJson_Warn("Down Motor CLOSE ERR","device_Down_TG"));
-//            }
+            if (num_down_close==190&&device_status.clear_status==0&&device_status.work_status==1&&atoi(device_status.power)-motor_current<150&&motor_current!=0&&motor_current<5000)
+            {
+                LOG_E("下仓门电机电流不足!!!");
+                err_cnt++;
+                char * ctr_cm_down_warn = makeJson_Warn("电流不足,关闭", "下仓门电机");
+                DTU_Write("%s",ctr_cm_down_warn);
+                rt_free(ctr_cm_down_warn);
+            }
             if (num_down_close == 0)
             {
                ctr_cangmen_down(OFF);
@@ -1672,7 +1700,7 @@ void Check_ParamConfig(void)
         device_status.run_sta = 0;
 
         sprintf(device_status.driver, "%s",VERSION_HK);
-        rt_sprintf(device_status.tempture, "26");
+        rt_sprintf(device_status.tempture, "-15");
         rt_sprintf(device_status.humidity, "31");
         rt_sprintf(device_status.mqttcfg1, "8.136.98.49");
         ef_set_env_blob("iSave", &device_status.iSave, sizeof(device_status.iSave));  //
@@ -1799,8 +1827,8 @@ void Check_ParamConfig(void)
         }
         else if (device_status.version_type==6)
         {
-            rt_pin_mode(HK_5000W_P, PIN_MODE_OUTPUT);
-            rt_pin_write(HK_5000W_P,ON);
+            //打开相机供电;
+            ctr_Camera_Power(ON);
             rt_sprintf(device_status.driver, "%s",VERSION_XCT);
         }
         else if (device_status.version_type==7) {
@@ -1821,11 +1849,11 @@ void Check_ParamConfig(void)
         #if LAMP_EN == 1
             if(device_status.sunBar%3!=0)
             {
-                device_status.sunBar = 9;
+                device_status.sunBar = 3;
             }
-            device_status.timeSwitch = 1;
-            device_status.startBar = 20;
-            device_status.stopBar = 23;
+//            device_status.timeSwitch = 1;
+//            device_status.startBar = 20;
+//            device_status.stopBar = 23;
         #endif
         LOG_I("SOFTWARE VERSION:%s-imei:%s--iccid:%s",device_status.driver,device_status.imei,device_status.iccid);
         LOG_I("read flash paramconfis:%d-%s-%s",device_status.version_type,device_status.driver_bl,device_status.driver_compile);
@@ -1879,11 +1907,13 @@ void Check_ParamConfig(void)
 #if SENSOR_EN==1
         mb_master_samlpe();
 #endif
+
 #if ROBOT_EN == 0
         uint16_t connect_num=0;
         //等待联网,
         while(atoi(device_status.net)==1)
         {
+            if(Read_Real_Voltage()/100>5&&device_status.power_status==0)
             ctr_RTU_DTU(ON);
             if(device_status.dtype==7)
             HMI_WRITE("sysTest.auto_flag.txt=\"0\"");
@@ -1923,6 +1953,7 @@ void Check_ParamConfig(void)
 }
 void ResetParamDefault(void)
 {
+    rt_sprintf(device_status.tempture,"%d",-15);
     device_status.ds = 1;           //设备状态开机
     device_status.thsp = 300;
     device_status.passWord = 8888;
@@ -1946,7 +1977,7 @@ void ResetParamDefault(void)
         #if LAMP_EN == 1
         device_status.sunBar = 3;       //光控定时时长
         #else
-        device_status.sunBar = 9;
+        device_status.sunBar = 8;
         #endif
         device_status.tph = 70;         //高温保护阈值
         device_status.tpl = -5;          //低温保护阈值
@@ -1985,6 +2016,8 @@ void ResetParamDefault(void)
 }
 void ResetParamDefault_DC(void)
 {
+    //将温度数据设置为-15摄氏度,以便上传的数据中包含温控数据
+    rt_sprintf(device_status.tempture,"%d",-15);
     device_status.clt_time = 10;    //收集时间
     device_status.dattim = 20;      //数据上传间隔
     #if LAMP_EN == 0

+ 1 - 1
Application_CBD/drivers/board.c

@@ -161,7 +161,7 @@ void HAL_TIM_MspPostInit(TIM_HandleTypeDef* htim)
     GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
     HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
     //吸虫塔屏蔽下面这行,孢子仪打开
-    //__HAL_AFIO_REMAP_TIM3_ENABLE();
+    __HAL_AFIO_REMAP_TIM3_ENABLE();
 
   /* USER CODE BEGIN TIM3_MspPostInit 1 */
 

+ 7 - 1
Application_CBD/packages/pkgs_error.json

@@ -1 +1,7 @@
-[]
+[
+ {
+  "path": "/packages/peripherals/sht3x", 
+  "ver": "latest", 
+  "name": "SHT3X"
+ }
+]

+ 0 - 52
Application_CBD/packages/sht3x-latest/.gitignore

@@ -1,52 +0,0 @@
-# Prerequisites
-*.d
-
-# Object files
-*.o
-*.ko
-*.obj
-*.elf
-
-# Linker output
-*.ilk
-*.map
-*.exp
-
-# Precompiled Headers
-*.gch
-*.pch
-
-# Libraries
-*.lib
-*.a
-*.la
-*.lo
-
-# Shared objects (inc. Windows DLLs)
-*.dll
-*.so
-*.so.*
-*.dylib
-
-# Executables
-*.exe
-*.out
-*.app
-*.i*86
-*.x86_64
-*.hex
-
-# Debug files
-*.dSYM/
-*.su
-*.idb
-*.pdb
-
-# Kernel Module Compile Results
-*.mod*
-*.cmd
-.tmp_versions/
-modules.order
-Module.symvers
-Mkfile.old
-dkms.conf

+ 0 - 202
Application_CBD/packages/sht3x-latest/LICENSE

@@ -1,202 +0,0 @@
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.

+ 0 - 166
Application_CBD/packages/sht3x-latest/docs/api.md

@@ -1,166 +0,0 @@
-# SHT3x API
-
-## 单次读出温湿度
-
-`rt_err_t sht3x_read_singleshot(sht3x_device_t dev)`
-
-| 参数              | 描述                                |
-|:------------------|:------------------------------------|
-|`dev`              | SHT3x设备结构体指针                 |
-| **返回**          | **描述**                            |
-|RT_EOK             | 正确执行                            |
-|-RT_ERROR          | 失败                                |
-
-
-## 软件复位
-
-`rt_err_t sht3x_softreset(sht3x_device_t dev)`
-
-| 参数              | 描述                                |
-|:------------------|:------------------------------------|
-|`dev`              | SHT3x设备结构体指针                 |
-| **返回**          | **描述**                            |
-|RT_EOK             | 正确执行                            |
-|-RT_ERROR          | 失败                                |
-
-
-## 状态寄存器清零
-
-`rt_err_t sht3x_clear_status(sht3x_device_t dev)`
-
-| 参数              | 描述                                |
-|:------------------|:------------------------------------|
-|`dev`              | SHT3x设备结构体指针                 |
-| **返回**          | **描述**                            |
-|RT_EOK             | 正确执行                            |
-|-RT_ERROR          | 失败                                |
-
-
-## 读取状态寄存器
-
-`rt_err_t sht3x_read_status(sht3x_device_t dev)`
-读取的状态寄存器的值存储在SHT3x设备结构体内的sht3x_status联合体中。
-
-| 参数              | 描述                                |
-|:------------------|:------------------------------------|
-|`dev`              | SHT3x设备结构体指针                 |
-| **返回**          | **描述**                            |
-|RT_EOK             | 正确执行                            |
-|-RT_ERROR          | 失败                                |
-
-
-## 使能heater
-
-`rt_err_t sht3x_enable_heater(sht3x_device_t dev)`
-
-| 参数              | 描述                                |
-|:------------------|:------------------------------------|
-|`dev`              | SHT3x设备结构体指针                 |
-| **返回**          | **描述**                            |
-|RT_EOK             | 正确执行                            |
-|-RT_ERROR          | 失败                                |
-
-
-## 关闭heater
-
-`rt_err_t sht3x_disable_heater(sht3x_device_t dev)`
-
-| 参数              | 描述                                |
-|:------------------|:------------------------------------|
-|`dev`              | SHT3x设备结构体指针                 |
-| **返回**          | **描述**                            |
-|RT_EOK             | 正确执行                            |
-|-RT_ERROR          | 失败                                |
-
-
-## 加速响应时间
-
-`rt_err_t sht3x_acc_resp_time(sht3x_device_t dev)`
-
-| 参数              | 描述                                |
-|:------------------|:------------------------------------|
-|`dev`              | SHT3x设备结构体指针                 |
-| **返回**          | **描述**                            |
-|RT_EOK             | 正确执行                            |
-|-RT_ERROR          | 失败                                |
-
-
-## 跳出连续读出模式
-
-`rt_err_t sht3x_break(sht3x_device_t dev)`
-
-| 参数              | 描述                                |
-|:------------------|:------------------------------------|
-|`dev`              | SHT3x设备结构体指针                 |
-| **返回**          | **描述**                            |
-|RT_EOK             | 正确执行                            |
-|-RT_ERROR          | 失败                                |
-
-
-## 初始化SHT3x设备
-
-`sht3x_device_t sht3x_init(const char *i2c_bus_name, rt_uint8_t sht3x_addr)`
-
-| 参数              | 描述                                |
-|:------------------|:------------------------------------|
-|`i2c_bus_name`     | i2c设备名称                         |
-|`sht3x_addr`       | SHT3x的i2c地址                      |
-| **返回**          | **描述**                            |
-|SHT3x设备地址      | 指向SHT3x设备结构体的指针           |
-|RT_NULL            | SHT3x初始化失败,返回空指针         |
-
-
-## sht3x MSH命令
-
-`void sht3x(int argc, char *argv[])`
-
-- sht3x probe <i2c_dev_name> <pu/pd>  --挂载SHT3x设备,需要指定i2c设备名称和上下拉方式,默认下拉
-- sht3x read --阅读SHT3x温湿度
-- sht3x status --读取查看状态寄存器值
-- sht3x reset --软件复位SHT3x
-- sht3x heater <on/off> --开/关heater
-
-MSH用例:
-```
-msh >sht3x
-Usage:
-        sht3x probe <i2c dev name> <pu/pd> -- probe sensor by i2c dev name and pull config
-        sht3x read -- read sensor sht3x data
-        sht3x status -- status register of sht3x
-        sht3x reset -- send soft reset command to sht3x
-        sht3x heater <on/off> -- turn on/off heater of sht3x
-
-msh>sht3x probe i2c1
-sht3x probed, addr:0x44
-
-msh >sht3x heater on
-sht3x heater cmd sent
-
-msh >sht3x status
-sht3x status:
-        checksum:       0       - 0 means checksum correct
-        command:        0       - 0 means last cmd executed OK
-        reset deteced:  0
-        alert pending:  0
-        T track alert:  0
-        RH track alert: 0
-        heater enabled: 1
-
-msh >sht3x heater off
-sht3x heater cmd sent
-
-msh >sht3x status
-sht3x status:
-        checksum:       0       - 0 means checksum correct
-        command:        0       - 0 means last cmd executed OK
-        reset deteced:  0
-        alert pending:  0
-        T track alert:  0
-        RH track alert: 0
-        heater enabled: 0
-
-msh >sht3x read
-sht3x humidity   : 39.9
-sht3x temperature: 24.5
-
-```

+ 9 - 0
Application_CBD/readme.md

@@ -1,3 +1,12 @@
+# 2023-6-20 更新说明
+#define VERSION_HK          "1.49.41(HK)"       //4.0海康-1200W
+#define VERSION_HK_2000W    "1.46.4(2000W)"         //4.0水稻
+#define VERSION_ZP          "1.41.1(ZP)"            //1.0转盘
+#define VERSION_GK          "1.39.1(GK)"            //1.0高空
+1. 修复概率性刷完程序屏幕登录密码无效的问题,将屏幕的密码写死为8888
+2. 备用电源功能完善,检测到外部断电后给RTU和路由器断电,外部电源恢复后路由器和RTU电源恢复
+3. 震动电机,上下仓门电机,清扫电机,相机,灯管增加电流检测上报;
+4. 触发雨控和温控立即上报最新数据(立即刷新定时上报时间);
 # 2023-5-10 更新说明
 #define VERSION_XCT         "1.13.6(HK)"            //吸虫塔-海康
 1. 拍照之后传送带转两次

+ 3 - 1
Application_CBD/rt-thread/src/kservice.c

@@ -1134,7 +1134,9 @@ rt_device_t rt_console_set_device(const char *name)
         rt_device_open(new_device, RT_DEVICE_OFLAG_RDWR | RT_DEVICE_FLAG_STREAM);
         _console_device = new_device;
     }
-
+    else {
+        rt_kprintf("%s is NULL",name);
+    }
     return old_device;
 }
 RTM_EXPORT(rt_console_set_device);

二進制
Application_CBD/rt-thread/tools/building.pyc


二進制
Application_CBD/rt-thread/tools/eclipse.pyc


二進制
Application_CBD/rt-thread/tools/menuconfig.pyc


二進制
Application_CBD/rt-thread/tools/mkdist.pyc


二進制
Application_CBD/rt-thread/tools/utils.pyc


+ 1 - 5
Application_CBD/rtconfig.h

@@ -197,7 +197,7 @@
 /* JSON: JavaScript Object Notation, a lightweight data-interchange format */
 
 #define PKG_USING_CJSON
-#define PKG_USING_CJSON_LATEST_VERSION
+#define PKG_USING_CJSON_V159
 /* end of JSON: JavaScript Object Notation, a lightweight data-interchange format */
 
 /* XML: Extensible Markup Language */
@@ -214,10 +214,6 @@
 /* u8g2: a monochrome graphic library */
 
 /* end of u8g2: a monochrome graphic library */
-
-/* PainterEngine: A cross-platform graphics application framework written in C language */
-
-/* end of PainterEngine: A cross-platform graphics application framework written in C language */
 /* end of multimedia packages */
 
 /* tools packages */

二進制
Application_CBD/rtconfig.pyc


二進制
Application_CBD_LED/.settings/.rtmenus