| | |
| | | uint16_t g_Resttimer; |
| | | uint8_t result; |
| | | u8 tag_succ_times=0; |
| | | int32_t hex_dist; |
| | | int32_t hex_dist,hex_dist2; |
| | | u16 checksum; |
| | | int8_t tag_delaytime; |
| | | extern uint16_t sync_timer; |
| | |
| | | } |
| | | TIM3->CNT=tmp_time; |
| | | } |
| | | memcpy(&hex_dist, &rx_buffer[DIST_IDX], 4); |
| | | memcpy(&hex_dist2, &rx_buffer[DIST_IDX], 4); |
| | | memcpy(&tx_final_msg[ANCHOR_ID_IDX], &rx_buffer[ANCHOR_ID_IDX], 4); |
| | | /* Compute final message transmission time. See NOTE 9 below. */ |
| | | final_tx_time = (resp_rx_ts + (RESP_RX_TO_FINAL_TX_DLY_UUS * UUS_TO_DWT_TIME)) >> 8;//璁$畻final鍖呭彂閫佹椂闂达紝T5=T4+Treply2 |
| | |
| | | memcpy(&usart_send[5],&dev_id,2); |
| | | memcpy(&usart_send[7],&rx_buffer[ANCHOR_ID_IDX],2); |
| | | |
| | | memcpy(&usart_send[9],&hex_dist,4); |
| | | memcpy(&usart_send[9],&hex_dist2,4); |
| | | usart_send[13] = battary; |
| | | usart_send[14] = button; |
| | | checksum = Checksum_u16(&usart_send[2],17); |