|
@@ -1541,7 +1541,6 @@ static void Ctr_Mortor_entry(void* parameter)
|
|
|
rt_uint16_t num_down_open = 200; // 下仓门打开时间
|
|
rt_uint16_t num_down_open = 200; // 下仓门打开时间
|
|
|
rt_uint16_t num_down_close = 200; // 下仓门关闭时间
|
|
rt_uint16_t num_down_close = 200; // 下仓门关闭时间
|
|
|
rt_int16_t photo_led_sec = 900; //55S
|
|
rt_int16_t photo_led_sec = 900; //55S
|
|
|
- static rt_uint16_t rtu_isboot_cnt = 0;
|
|
|
|
|
static rt_uint16_t mock_uart2_timer_cnt = 0;
|
|
static rt_uint16_t mock_uart2_timer_cnt = 0;
|
|
|
static rt_uint16_t route_off_t = 0;
|
|
static rt_uint16_t route_off_t = 0;
|
|
|
device_status.route_off_t = 0;
|
|
device_status.route_off_t = 0;
|
|
@@ -1558,27 +1557,12 @@ static void Ctr_Mortor_entry(void* parameter)
|
|
|
{
|
|
{
|
|
|
char *rep = makeJsonRpc2_0("reboot",NULL, 1);
|
|
char *rep = makeJsonRpc2_0("reboot",NULL, 1);
|
|
|
if(rep){
|
|
if(rep){
|
|
|
- device_status.rtu_isboot = 1;
|
|
|
|
|
DTU_Write(rep);
|
|
DTU_Write(rep);
|
|
|
- //启动超时定时器
|
|
|
|
|
- Start_timer_Uart2();
|
|
|
|
|
free(rep);
|
|
free(rep);
|
|
|
}
|
|
}
|
|
|
rt_thread_delay(1000);
|
|
rt_thread_delay(1000);
|
|
|
}
|
|
}
|
|
|
- if(device_status.rtu_isboot == 1){
|
|
|
|
|
- rtu_isboot_cnt++;
|
|
|
|
|
- if(rtu_isboot_cnt>=200)
|
|
|
|
|
- {
|
|
|
|
|
- device_status.rtu_isboot = 0;
|
|
|
|
|
- rtu_isboot_cnt = 0;
|
|
|
|
|
- ctr_RTU_DTU(OFF);
|
|
|
|
|
- rt_thread_delay(1000*31);
|
|
|
|
|
- ctr_RTU_DTU(ON);
|
|
|
|
|
- }
|
|
|
|
|
- }else{
|
|
|
|
|
- rtu_isboot_cnt = 0;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
if(device_status.mock_uart2_timer_flag==1){
|
|
if(device_status.mock_uart2_timer_flag==1){
|
|
|
mock_uart2_timer_cnt++;
|
|
mock_uart2_timer_cnt++;
|
|
|
if(mock_uart2_timer_cnt>=200){
|
|
if(mock_uart2_timer_cnt>=200){
|