| | |
| | | flag_secondtask = 1; |
| | | #ifdef UWB_1_5HZ |
| | | uwb_time_count++; |
| | | #endif |
| | | uwb_offtime_count++; |
| | | if(uwb_offtime_count>30) |
| | | { |
| | | uwb_offtime_count=0; |
| | | current_state = STATE_SLEEP; |
| | | } |
| | | #endif |
| | | if(!read_5v_input_pca()) |
| | | { |
| | | if(bat_percent>15) |
| | |
| | | } |
| | | g_com_map[MODBUS_MODE] = 0; |
| | | log_4g_enable_flag=g_com_map[LOG_4G_ENABLE]; |
| | | g_com_map[VERSION] = (1<<8)|12; |
| | | g_com_map[VERSION] = (1<<8)|13; |
| | | |
| | | |
| | | LOG_INFO(TRACE_MODULE_APP,"设备ID: %x .\r\n",dev_id); |
| | |
| | | IIC2_Init(); |
| | | Accelerometer_Init(); |
| | | PCA9555_init(); |
| | | WT588E02B_Init(); |
| | | adc_open(&usr_adc_cfg); |
| | | uart_receive(UART_ID1,m_EUART_DMA_RXBuf,EUART_RX_BUF_SIZE,uart_receive_callback); |
| | | power_init(); |
| | |
| | | gps_prase_flag=1;//恢复gps解析 |
| | | uart1_change_from_debug_to_gps();//测试 |
| | | PCA9555_Set_One_Value_Output(MCU_A,0);//输出低电平切换为GPS |
| | | #ifdef UWB_CG |
| | | CloseUWB(); |
| | | #endif |
| | | while (1) |
| | | { |
| | | uwb_app_poll(); |