| | |
| | | u8 nearbase_num=0,last_nearbase_num,next_nearbase_num,last_slotnum, para_update,para_len,stationary_flag=0; |
| | | u32 rec_tagpos_binary; |
| | | int16_t offset=4700,temptimer; |
| | | u8 motor_state,rec_remotepara_state,rec_remotepara[80]; |
| | | static u8 motor_state,rec_remotepara_state,rec_remotepara[80]; |
| | | |
| | | |
| | | #define SINGLEPOLL_BASENUM 5 |
| | |
| | | tagpoll_sync_sec = current_slotpos/200; |
| | | tagslotpos = current_slotpos%200; |
| | | max_slotpos = rec_tagperiod*20; |
| | | tag_frequency = 10/rec_tagperiod; |
| | | tag_state=NEARPOLL; |
| | | } |
| | | }else{ |
| | |
| | | { |
| | | static u8 regpoll_count=0; |
| | | mainbase_lost_count = 0; |
| | | tag_frequency = REGISTER_FREQUENCY; |
| | | //tag_frequency = REGISTER_FREQUENCY; |
| | | bigslot_num = TOTAL_SLOTNUM/tag_frequency; |
| | | regpoll_count++; |
| | | if(regpoll_count%2) |
| | |
| | | } |
| | | error_times = 0; |
| | | } |
| | | |
| | | void Tag_App(void)//发送模式(TAG标签) |
| | | { |
| | | static uint8_t diccount = 0,diccount2; |
| | | //LED0_ON; |
| | | UWBWkWp(); |
| | | if(0) |
| | | { |
| | | FZNearPoll(); |
| | | }else{ |
| | | switch(tag_state) |
| | | { |
| | | case REGPOLL: |
| | |
| | | case SINGLEPOLL: |
| | | // Poll(); |
| | | break; |
| | | }} |
| | | |
| | | FZNearPoll(); |
| | | |
| | | } |
| | | FZNearPoll(); |
| | | dwt_forcetrxoff(); |
| | | userkey_state = !GET_USERKEY; |
| | | userkey_state = !GET_USERKEY; |
| | | dwt_entersleep(); |
| | | } |