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

+ 1 - 1
Application_cbd_apm32f1/applications/control.h

@@ -33,7 +33,7 @@
     #define VERSION_HK_2000W    "1.3led.40(2000W)"       //水稻
 #else
     #define VERSION_HK          "2.5.41(HK)"            //4.0海康-1200W
-    #define VERSION_HK_2000W    "2.18.4(2000W)"         //4.0水稻
+    #define VERSION_HK_2000W    "2.19.4(2000W)"         //4.0水稻
 #endif
 
 #define VERSION_ZP          "1.45.1(ZP)"            //1.0转盘

+ 2 - 2
Application_cbd_apm32f1/applications/dtu_uart2.c

@@ -78,7 +78,7 @@ static int DTU_uart2_init(void)
         rt_device_control(dtuserial, RT_DEVICE_CTRL_CONFIG, &dtuconfig);
         /* step4:打开串口设备。以DMA接收及轮询发送模式打开串口设备 */
         #ifdef RT_USING_SERIAL_V2
-        rt_err_t uart_res = rt_device_open(dtuserial, RT_DEVICE_FLAG_RX_NON_BLOCKING | RT_DEVICE_FLAG_TX_BLOCKING); // 串口设备使用模式为 (发送阻塞 接收非阻塞) 模式
+        rt_err_t uart_res = rt_device_open(dtuserial, RT_DEVICE_FLAG_RX_NON_BLOCKING | RT_DEVICE_FLAG_TX_NON_BLOCKING); // 串口设备使用模式为 (发送阻塞 接收非阻塞) 模式
         #else
         rt_err_t uart_res = rt_device_open(dtuserial, RT_DEVICE_FLAG_DMA_RX);  //RT_DEVICE_FLAG_DMA_RX
         #endif
@@ -107,7 +107,7 @@ void DTU_Write(char *fmt, ...)
     if (str_length > 1024 - 1)
         str_length = 1024 - 1;
     rt_device_write(dtuserial, 0, dtu_str, str_length);
-    rt_thread_mdelay(20);
+    rt_thread_mdelay(100);
 //    if(strstr(dtu_str,"volume")!=RT_NULL)
 //    {
 //        rt_device_write(dtuserial,0,dtu_conf,4);

+ 4 - 0
Application_cbd_apm32f1/readme.md

@@ -1,3 +1,7 @@
+# 2025-06-05 更新说明
+#define VERSION_HK_2000W    "2.19.4(2000W)"         //4.0水稻
+1. DTU_Write 延时由20ms改为100ms;
+2. RT_DEVICE_FLAG_TX_NON_BLOCKING,串口发送改为非阻塞方式
 
 	光控损坏的处理
 # 2025-06-03 更新说明