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

+ 4 - 0
Application_cbd_apm32f1/applications/control.c

@@ -1618,6 +1618,10 @@ void WorkTask_XYV3(void)
                     ctr_router(ON);
                     ctr_router(ON);
                     ctr_RTU_DTU(ON);
                     ctr_RTU_DTU(ON);
                 }
                 }
+                if(cal_n==7000){
+                    ctr_router(OFF);
+                    ctr_RTU_DTU(OFF);
+                }
             }
             }
             if(device_status.sleep_mode==10)
             if(device_status.sleep_mode==10)
             {
             {

+ 2 - 1
Application_cbd_apm32f1/applications/dtu_uart2.c

@@ -251,9 +251,10 @@ void process_uart_data(const char *data, int length)
             return; // 等待更多数据
             return; // 等待更多数据
 
 
         default:
         default:
-            rt_kprintf("[JSON] Error %d at pos %d\n", status, start_pos);
+            LOG_E("[JSON] Error %d at pos %d", status, start_pos);
             // 错误恢复:跳过错误数据
             // 错误恢复:跳过错误数据
             json_ctx.index = 0;
             json_ctx.index = 0;
+            rt_memset(json_ctx.buffer, 0, sizeof(json_ctx.buffer));
             return;
             return;
         }
         }
     }
     }