| | |
| | | #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 |
| | |
| | | { |
| | | g_Tagdist[anc_id_recv]= hex_dist2; |
| | | g_flag_Taggetdist[anc_id_recv]=0; |
| | | |
| | | Modbus_HoldReg[anc_id_recv*2]=hex_dist2>>16; |
| | | Modbus_HoldReg[anc_id_recv*2+1]=hex_dist2; |
| | | if(!g_com_map[MODBUS_MODE]) |
| | | { |
| | | hex_dist2 = hex_dist2; |
| | |
| | | checksum = Checksum_u16(&usart_send[2],17); |
| | | memcpy(&usart_send[19],&checksum,2); |
| | | UART_PushFrame(usart_send,21); |
| | | |
| | | } |
| | | } |
| | | // memcpy(&Modbus_HoldReg[anc_id_recv*2],&hex_dist,4); |