| | |
| | | } |
| | | //UWB更新列表 |
| | | TagListUpdate(); |
| | | GPS_Poll(); |
| | | //GPS_Poll(); |
| | | GPS_Poll_1h(); |
| | | //UWB状态检测 |
| | | |
| | | if(IfTCPConnected()) |
| | |
| | | // UWBPoll(); |
| | | |
| | | |
| | | MotorPoll(); |
| | | //MotorPoll(); |
| | | |
| | | if(secondtask_count++%2==0) |
| | | { |
| | |
| | | |
| | | flag_sleeptimer = 1; |
| | | |
| | | //马达震动逻辑 |
| | | if(g_com_map[MOTOR_ENABLE]) |
| | | { |
| | | if(motor_open_air_flag||moter_open_uwb_flag) |
| | | { |
| | | if (motor_count++%2==0) |
| | | { |
| | | motor_power_state = 1; |
| | | }else{ |
| | | motor_power_state = 0; |
| | | } |
| | | } else { |
| | | motor_power_state=1; |
| | | } |
| | | }else{ |
| | | motor_power_state=1; |
| | | } |
| | | if(delaysleep_count>0) |
| | | delaysleep_count--; |
| | | //GPS工作逻辑 |
| | |
| | | SecondTask(); |
| | | } |
| | | IdleTask(); |
| | | //3种情况后都要发包和休眠 |
| | | //if(send_flag){ |
| | | //message_construct(); |
| | | //send_udp; |
| | | //air780_success_state=0;//关闭4G成功发送灯 |
| | | //blink_led(&air780_success_state);//成功测距闪烁4G状态灯 |
| | | //air780_success_state=0; |
| | | //} |
| | | |
| | | #ifndef DEBUG_MODE |
| | | //if(flag_sleeptimer) |
| | | // if(!gpio_pin_get_val(INPUT_5V_Pin))//AIR780E_IsIPIdle() Socket_IsSendQueueEmpty(0) |