From 4b4ea36e9b4e8bd6eef939740aa35c62b74b98c2 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Tue, 8 Mar 2016 17:11:42 +0100 Subject: [PATCH] TSCH: substract RADIO_DELAY_BEFORE_DETECT from ACK timestamp (more accurate timeout for the following busy wait) --- core/net/mac/tsch/tsch-slot-operation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/net/mac/tsch/tsch-slot-operation.c b/core/net/mac/tsch/tsch-slot-operation.c index c632549dd..befd5a18f 100644 --- a/core/net/mac/tsch/tsch-slot-operation.c +++ b/core/net/mac/tsch/tsch-slot-operation.c @@ -506,7 +506,7 @@ PT_THREAD(tsch_tx_slot(struct pt *pt, struct rtimer *t)) tx_start_time, tx_duration + tsch_timing[tsch_ts_rx_ack_delay] + tsch_timing[tsch_ts_ack_wait]); TSCH_DEBUG_TX_EVENT(); - ack_start_time = RTIMER_NOW(); + ack_start_time = RTIMER_NOW() - RADIO_DELAY_BEFORE_DETECT; /* Wait for ACK to finish */ BUSYWAIT_UNTIL_ABS(!NETSTACK_RADIO.receiving_packet(),