From 5be78ce84321f29a625972117a9396e1a1d733aa Mon Sep 17 00:00:00 2001 From: adamdunkels Date: Wed, 3 Feb 2010 21:11:33 +0000 Subject: [PATCH] The button sensor must be initialized before it is used --- examples/rime/example-collect.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/rime/example-collect.c b/examples/rime/example-collect.c index c5cab544d..7a33dbc37 100644 --- a/examples/rime/example-collect.c +++ b/examples/rime/example-collect.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: example-collect.c,v 1.9 2009/10/18 17:52:08 adamdunkels Exp $ + * $Id: example-collect.c,v 1.10 2010/02/03 21:11:33 adamdunkels Exp $ */ /** @@ -71,11 +71,12 @@ PROCESS_THREAD(example_collect_process, ev, data) { PROCESS_BEGIN(); + SENSORS_ACTIVATE(button_sensor); + collect_open(&tc, 130, &callbacks); while(1) { static struct etimer et; - uint16_t tmp; /* Send a packet every 16 seconds; first wait 8 seconds, than a random time between 0 and 8 seconds. */