mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-01-21 23:31:11 +00:00
Timing bugfix in the waiting period between channel samples to check if the coast is clear before sending a packet.
This commit is contained in:
parent
06123fefe2
commit
9cb830ed37
@ -28,7 +28,7 @@
|
||||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: contikimac.c,v 1.38 2010/10/03 20:39:24 adamdunkels Exp $
|
||||
* $Id: contikimac.c,v 1.39 2010/10/20 22:25:24 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -754,10 +754,11 @@ send_packet(mac_callback_t mac_callback, void *mac_callback_ptr)
|
||||
break;
|
||||
}
|
||||
off();
|
||||
t0 = RTIMER_NOW();
|
||||
#if NURTIMER
|
||||
while(RTIMER_CLOCK_LT(t0, RTIMER_NOW(), t0 + CCA_SLEEP_TIME + CCA_CHECK_TIME));
|
||||
while(RTIMER_CLOCK_LT(t0, RTIMER_NOW(), t0 + CCA_SLEEP_TIME));
|
||||
#else
|
||||
while(RTIMER_CLOCK_LT(RTIMER_NOW(), t0 + CCA_SLEEP_TIME + CCA_CHECK_TIME)) { }
|
||||
while(RTIMER_CLOCK_LT(RTIMER_NOW(), t0 + CCA_SLEEP_TIME)) { }
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user