Made sure that two packets sent consecutively from the same node do not interfere with each other

This commit is contained in:
adamdunkels 2007-03-31 18:47:27 +00:00
parent a2047f5422
commit 8e45418649

View file

@ -30,7 +30,7 @@
* *
* Author: Adam Dunkels <adam@sics.se> * Author: Adam Dunkels <adam@sics.se>
* *
* $Id: ether.c,v 1.7 2007/03/29 22:25:25 adamdunkels Exp $ * $Id: ether.c,v 1.8 2007/03/31 18:47:27 adamdunkels Exp $
*/ */
/** /**
* \file * \file
@ -434,7 +434,15 @@ ether_tick(void)
((q->x - x) * (q->x - x) + ((q->x - x) * (q->x - x) +
(q->y - y) * (q->y - y) <= (q->y - y) * (q->y - y) <=
ether_strength() * ether_strength())) { ether_strength() * ether_strength())) {
/* If the potentially interfering packets were sent from
the same node, then they don't interfere with each
other. Otherwise they interfere and we sent the
interference flag to 1. */
if(p->x != q->x ||
p->y != q->y) {
interference = 1; interference = 1;
}
break; break;
} }
} }