| | |
| | | #define FINAL_MSG_FINAL_TX_TS_IDX 18 |
| | | #define FINAL_MSG_TS_LEN 4 |
| | | |
| | | #define STARTPOLL REGPOLL |
| | | #define SWITCHBASE_DIST |
| | | //#define SWITCHBASE_ZHUANDIAN |
| | | #define STARTPOLL REGPOLL//#define SWITCHBASE_DIST |
| | | #define SWITCHBASE_ZHUANDIAN |
| | | enum enumtagstate |
| | | { |
| | | REGPOLL, |
| | |
| | | extern float motor_keeptime; |
| | | uint8_t changemainbase_count=0,gotosleep_flag; |
| | | uint32_t frame_len; |
| | | int32_t salvebase_mindist; |
| | | void NearPoll(void) |
| | | { |
| | | |
| | | uint32_t temp1,temp2,dw_systime,salvebase_mindist=999999,mindist_slavebaseid; |
| | | uint32_t temp1,temp2,dw_systime,mindist_slavebaseid; |
| | | |
| | | uint32_t final_tx_time; |
| | | u32 start_poll; |
| | |
| | | dwt_setrxaftertxdelay(POLL_TX_TO_RESP_RX_DLY_UUS); //设置发送后开启接收,并设定延迟时间 |
| | | dwt_setrxtimeout(RESP_RX_TIMEOUT_UUS); |
| | | tag_succ_times = 0; |
| | | |
| | | salvebase_mindist=999999; |
| | | if(next_nearbase_num>=MAX_NEARBASE_NUM) |
| | | { |
| | | next_nearbase_num = MAX_NEARBASE_NUM-1; |
| | |
| | | { |
| | | if( pack_index == MOTOR_ONTIME_INDEX) |
| | | { |
| | | motor_keeptime = rec_remotepara[3]; |
| | | if(motor_keeptime==0) |
| | | motor_keeptime = rec_remotepara[3]; |
| | | }else{ |
| | | memcpy((uint8_t*)&g_com_map + pack_index, &rec_remotepara[3], pack_length); |
| | | //返回一个error状态 |