| | |
| | | #include "modbus.h" |
| | | //#define DEBUG_OUTPUT |
| | | #define TDFILTER |
| | | #define CONSTANT_FILTER |
| | | //#define CONSTANT_FILTER |
| | | /*------------------------------------ Marcos ------------------------------------------*/ |
| | | /* Inter-ranging delay period, in milliseconds. */ |
| | | #define RNG_DELAY_MS 100 |
| | |
| | | TIM3->CNT=tmp_time; |
| | | } |
| | | memcpy(&hex_dist2, &rx_buffer[DIST_IDX], 4); |
| | | memcpy(&tag_distarray[i*4], &rx_buffer[DIST_IDX], 4); |
| | | memcpy(&tag_IDarray[i*2],&rx_buffer[ANCHOR_ID_IDX],2); |
| | | memcpy(&tag_distarray[i], &rx_buffer[DIST_IDX], 4); |
| | | memcpy(&tag_IDarray[i],&rx_buffer[ANCHOR_ID_IDX],2); |
| | | rec_firstpath_power = rx_buffer[SIGNALPOWER]; |
| | | memcpy(&tx_final_msg[ANCHOR_ID_IDX], &rx_buffer[ANCHOR_ID_IDX], 4); |
| | | memcpy(&rec_com_interval,&rx_buffer[ANCSEND_INTERVAL], 2); |
| | |
| | | memcpy(&usart_send[5],&tag_id_recv,2); |
| | | memcpy(&usart_send[7],&ancrec_IDarray[i],2); |
| | | |
| | | memcpy(&usart_send[9],&anchor_dist_last_frm[tag_id_recv-TAG_ID_START],4); |
| | | memcpy(&usart_send[9],&ancrec_distarray[i],4); |
| | | usart_send[13] = battary; |
| | | usart_send[14] = button; |
| | | usart_send[15] = firstpath_power; |