| | |
| | | if(!power_low_flag) |
| | | { |
| | | GPS_Poll(); |
| | | //gps_power_state=1;//常开GPS |
| | | }else{ |
| | | gps_power_state=0;//关闭GPS |
| | | update_led_power_state(); |
| | |
| | | } |
| | | //gps_power_state=1;//测试gps长开 |
| | | //UWB状态检测 |
| | | |
| | | if(!power_low_flag)//低供电下不需要检测重连 |
| | | { |
| | | if(IfTCPConnected()) |
| | | { |
| | | TCP_reconnect_timer =0; |
| | |
| | | } |
| | | |
| | | } |
| | | } |
| | | HIDO_TimerTick(); |
| | | nomove_count++; |
| | | if(nomove_count<=g_com_map[NOMOVESLEEP_TIME])//防止溢出 |
| | | nomove_count++; |
| | | else{ |
| | |
| | | // g_com_map[SEND_4G_SECOND]=60; |
| | | if(g_com_map[SEND_4G_MINUTE]<1) |
| | | g_com_map[SEND_4G_MINUTE]=1; |
| | | air780e_send_second=g_com_map[SEND_4G_MINUTE]*60; |
| | | g_com_map[MODBUS_MODE] = 0; |
| | | |
| | | //air780e_send_second=g_com_map[SEND_4G_MINUTE]*60;//yuan |
| | | air780e_send_second=g_com_map[SEND_4G_MINUTE]; |
| | | g_com_map[MODBUS_MODE] = 0; |
| | | log_4g_enable_flag=g_com_map[LOG_4G_ENABLE]; |
| | | ip0 = (g_com_map[TCP_IP_0]>>12&0xf)*1000+(g_com_map[TCP_IP_0]>>8&0xf)*100+(g_com_map[TCP_IP_0]>>4&0xf)*10+(g_com_map[TCP_IP_0]&0xf); |
| | | ip1 = (g_com_map[TCP_IP_1]>>12&0xf)*1000+(g_com_map[TCP_IP_1]>>8&0xf)*100+(g_com_map[TCP_IP_1]>>4&0xf)*10+(g_com_map[TCP_IP_1]&0xf); |
| | | ip2 = (g_com_map[TCP_IP_2]>>12&0xf)*1000+(g_com_map[TCP_IP_2]>>8&0xf)*100+(g_com_map[TCP_IP_2]>>4&0xf)*10+(g_com_map[TCP_IP_2]&0xf); |
| | | ip3 = (g_com_map[TCP_IP_3]>>12&0xf)*1000+(g_com_map[TCP_IP_3]>>8&0xf)*100+(g_com_map[TCP_IP_3]>>4&0xf)*10+(g_com_map[TCP_IP_3]&0xf); |
| | | port = g_com_map[TCP_PORT]; |
| | | g_com_map[VERSION] = (1<<8)|12; |
| | | g_com_map[VERSION] = (1<<8)|14; |
| | | LOG_INFO(TRACE_MODULE_APP,"设备ID: %x .\r\n",dev_id); |
| | | LOG_INFO(TRACE_MODULE_APP,"固件版本:UWB-4G车载手环 V%d.%d. \r\n",g_com_map[VERSION]>>8,g_com_map[VERSION]&0xff); |
| | | LOG_INFO(TRACE_MODULE_APP,"服务器地址: %d.%d.%d.%d:%d.\r\n",ip0,ip1,ip2,ip3,port); |