Update example-collect.c
- bugfix: more frequent transmissions than expected (every 30 seconds) - indentation: replace tabs with spaces
This commit is contained in:
parent
5d19196e54
commit
8b3f29325d
|
@ -88,15 +88,12 @@ PROCESS_THREAD(example_collect_process, ev, data)
|
|||
while(1) {
|
||||
|
||||
/* Send a packet every 30 seconds. */
|
||||
if(etimer_expired(&periodic)) {
|
||||
etimer_set(&periodic, CLOCK_SECOND * 30);
|
||||
etimer_set(&et, random_rand() % (CLOCK_SECOND * 30));
|
||||
}
|
||||
|
||||
PROCESS_WAIT_EVENT();
|
||||
PROCESS_WAIT_UNTIL(etimer_expired(&et));
|
||||
|
||||
|
||||
if(etimer_expired(&et)) {
|
||||
{
|
||||
static linkaddr_t oldparent;
|
||||
const linkaddr_t *parent;
|
||||
|
||||
|
@ -118,6 +115,7 @@ PROCESS_THREAD(example_collect_process, ev, data)
|
|||
}
|
||||
}
|
||||
|
||||
PROCESS_WAIT_UNTIL(etimer_expired(&periodic));
|
||||
}
|
||||
|
||||
PROCESS_END();
|
||||
|
|
Loading…
Reference in a new issue