| | |
| | | Set4LEDColor(uwbled,rtkled,led4g,powerled); |
| | | delay_ms(500); |
| | | keystarttime = HIDO_TimerGetTick(); |
| | | PCA9555_Set_One_Value_Output(PWR_ENABLE,0);//低电平关闭 |
| | | PCA9555_Set_One_Value_Output(LED_POWER,0);//输出低电平关闭LED |
| | | PCA9555_Set_One_Value_Output(AIR780E_ENBALE,0); |
| | | PCA9555_Set_One_Value_Output(GPS_POWER,0);//关GPS |
| | | PCA9555_Set_One_Value_Output(PWR_ENABLE,0);//低电平关闭 |
| | | |
| | | } |
| | | // if(HIDO_TimerGetTick() - keystarttime2>10) |
| | | // { |
| | |
| | | second_count = 0; |
| | | MinuteTask(); |
| | | } |
| | | // //UWB状态检测 |
| | | //if(!power_low_flag)//低供电下不需要检测重连 |
| | | // { |
| | | // if(IfTCPConnected()) |
| | | // { |
| | | // TCP_reconnect_timer =0; |
| | | // flag_TCP_reconnectting = 0; |
| | | // } else { |
| | | // if(TCP_reconnect_timer<30)//如果TCP没有连接,每隔10分钟尝试连接30秒 |
| | | // { |
| | | // flag_TCP_reconnectting = 1; |
| | | // } else { |
| | | // flag_TCP_reconnectting = 0; |
| | | // } |
| | | // if(TCP_reconnect_timer++>600) |
| | | // { |
| | | // TCP_reconnect_timer = 0; |
| | | // } |
| | | //UWB状态检测 |
| | | if(!power_low_flag)//低供电下不需要检测重连 |
| | | { |
| | | if(IfTCPConnected()) |
| | | { |
| | | TCP_reconnect_timer =0; |
| | | flag_TCP_reconnectting = 0; |
| | | } else { |
| | | if(TCP_reconnect_timer<30)//如果TCP没有连接,每隔10分钟尝试连接30秒 |
| | | { |
| | | flag_TCP_reconnectting = 1; |
| | | } else { |
| | | flag_TCP_reconnectting = 0; |
| | | } |
| | | if(TCP_reconnect_timer++>600) |
| | | { |
| | | TCP_reconnect_timer = 0; |
| | | } |
| | | |
| | | // } |
| | | // } |
| | | } |
| | | } |
| | | HIDO_TimerTick(); |
| | | // if(nomove_count<=g_com_map[NOMOVESLEEP_TIME])//防止溢出 |
| | | nomove_count++; |
| | |
| | | rtkled=0; |
| | | led4g=0; |
| | | powerled=0; |
| | | PCA9555_Set_One_Value_Output(AIR780E_ENBALE,0); |
| | | // PCA9555_Set_One_Value_Output(AIR780E_ENBALE,0); |
| | | while(1) |
| | | { |
| | | nomove_count = 0; |
| | |
| | | powerled = RED; |
| | | } |
| | | UART_CheckReceive(); |
| | | delay_ms(100); |
| | | Internet_Poll(); |
| | | HIDO_TimerPoll(); |
| | | HIDO_ATLitePoll(); |
| | | TCPClient_Poll(); |
| | | if(flag_secondtask) |
| | | { |
| | | flag_secondtask = 0; |
| | | SecondTask(); |
| | | } |
| | | Set4LEDColor(0,0,0,powerled); |
| | | if(input5v_time) |
| | | { |