| | |
| | | static uint64_t final_rx_ts; |
| | | static uint32_t status_reg = 0; |
| | | extern uint8_t tx_near_msg[80]; |
| | | static uint8_t motor_state,result; |
| | | extern uint8_t motor_state; |
| | | static u8 result; |
| | | static uint64_t get_tx_timestamp_u64(void) |
| | | { |
| | | uint8_t ts_tab[5]; |
| | |
| | | *ts += ts_field[i] << (i * 8); |
| | | } |
| | | } |
| | | u8 send_buffer[100]; |
| | | u8 send_buffer[100],outside_count; |
| | | #define FZ_NEARBASENUM_INDEX 10 |
| | | #define FZ_NEARBASEID_INDEX 11 |
| | | void FZNearPoll(void) |
| | |
| | | |
| | | neartimout_timer = 0; |
| | | recbase_num=0; |
| | | start_count=HAL_LPTIM_ReadCounter(&hlptim1); |
| | | timeout=ceil((float)nearbase_num*SLOT_SCALE)+3; |
| | | current_count=HAL_LPTIM_ReadCounter(&hlptim1); |
| | | end_count=start_count+(timeout<<5); |
| | |
| | | memcpy(&usart_send[4+report_num*6],&checksum,2); |
| | | USART_puts(usart_send,6+report_num*6); |
| | | #endif |
| | | |
| | | if(motor_state==2) |
| | | {outside_count=0; |
| | | }else{ |
| | | outside_count++; |
| | | } |
| | | for(i=0;i<MAX_NEARBASE_NUM;i++) |
| | | { |
| | | nearbase_distlist[i]=0x1ffff; |