mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-23 01:29:33 +00:00
Use random_rand() instead of rand() due to bug on msp430
This commit is contained in:
parent
06386b6f30
commit
fbdd9799bd
@ -28,7 +28,7 @@
|
||||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: uabc.c,v 1.3 2007/03/22 17:37:10 adamdunkels Exp $
|
||||
* $Id: uabc.c,v 1.4 2007/03/25 21:44:23 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -112,7 +112,7 @@ uabc_send(struct uabc_conn *c, clock_time_t interval)
|
||||
}
|
||||
c->q = queuebuf_new_from_rimebuf();
|
||||
if(c->q != NULL) {
|
||||
ctimer_set(&c->t, interval / 2 + (rand() % (interval / 2)), send, c);
|
||||
ctimer_set(&c->t, interval / 2 + (random_rand() % (interval / 2)), send, c);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
@ -33,7 +33,7 @@
|
||||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: uibc.c,v 1.3 2007/03/25 12:03:12 adamdunkels Exp $
|
||||
* $Id: uibc.c,v 1.4 2007/03/25 21:44:23 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -137,7 +137,7 @@ uibc_send(struct uibc_conn *c, clock_time_t interval)
|
||||
}
|
||||
c->q = queuebuf_new_from_rimebuf();
|
||||
if(c->q != NULL) {
|
||||
ctimer_set(&c->t, interval / 2 + (rand() % (interval / 2)), send, c);
|
||||
ctimer_set(&c->t, interval / 2 + (random_rand() % (interval / 2)), send, c);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user