From 1b74420718c79c78ae0889a65998728d35241063 Mon Sep 17 00:00:00 2001 From: Olivier Matz Date: Tue, 6 May 2014 23:00:20 +0200 Subject: [PATCH] sq timestamp --- rc_proto.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rc_proto.c b/rc_proto.c index 4b1ffb1..1c1a29f 100644 --- a/rc_proto.c +++ b/rc_proto.c @@ -269,7 +269,7 @@ int8_t rc_proto_send_echo_req(uint64_t addr, void *data, uint8_t data_len, /* send an echo message: expect a reply */ int8_t rc_proto_send_echo_ans(uint64_t addr, void *data, uint8_t data_len, - int8_t power) + int8_t power, uint16_t timestamp) { struct rc_proto_echo_ans hdr; struct xbee_msg msg; @@ -278,6 +278,7 @@ int8_t rc_proto_send_echo_ans(uint64_t addr, void *data, uint8_t data_len, hdr.type = RC_PROTO_ECHO_ANS; hdr.datalen = data_len; + hdr.timestamp = timestamp; msg.iovlen = 2; msg.iov[0].buf = &hdr; @@ -612,7 +613,8 @@ int rc_proto_rx(struct xbee_recv_hdr *recvframe, unsigned len) stats.echo_req_rx++; if (rc_proto_send_echo_ans(ntohll(recvframe->srcaddr), - rce->data, rce->datalen, power) < 0) + rce->data, rce->datalen, power, + rce->timestamp) < 0) return -1; return 0; -- 2.39.5