From bf04174bb3ab3703374c5593aebf030155a97e51 Mon Sep 17 00:00:00 2001 From: nifi Date: Fri, 15 Jan 2010 10:24:35 +0000 Subject: [PATCH] Updated to match the new sensors API --- examples/rime/example-mesh.c | 4 ++-- examples/rime/example-multihop.c | 4 ++-- examples/rime/example-rucb.c | 4 ++-- examples/rime/example-rudolph0.c | 4 ++-- examples/rime/example-rudolph1.c | 4 ++-- examples/rime/example-rudolph2.c | 4 ++-- examples/rime/example-trickle.c | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/examples/rime/example-mesh.c b/examples/rime/example-mesh.c index 0ee377f53..801ef7b68 100644 --- a/examples/rime/example-mesh.c +++ b/examples/rime/example-mesh.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: example-mesh.c,v 1.6 2010/01/14 14:32:22 joxe Exp $ + * $Id: example-mesh.c,v 1.7 2010/01/15 10:24:35 nifi Exp $ */ /** @@ -83,7 +83,7 @@ PROCESS_THREAD(example_mesh_process, ev, data) mesh_open(&mesh, 132, &callbacks); - button_sensor.configure(SENSORS_ACTIVE, (void *) 1); + SENSORS_ACTIVATE(button_sensor); while(1) { rimeaddr_t addr; diff --git a/examples/rime/example-multihop.c b/examples/rime/example-multihop.c index 6fec87ff8..719175df0 100644 --- a/examples/rime/example-multihop.c +++ b/examples/rime/example-multihop.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: example-multihop.c,v 1.6 2010/01/14 14:32:22 joxe Exp $ + * $Id: example-multihop.c,v 1.7 2010/01/15 10:24:36 nifi Exp $ */ /** @@ -221,7 +221,7 @@ PROCESS_THREAD(example_multihop_process, ev, data) /* Activate the button sensor. We use the button to drive traffic - when the button is pressed, a packet is sent. */ - button_sensor.configure(SENSORS_ACTIVE, (void *) 1); + SENSORS_ACTIVATE(button_sensor); /* Loop forever, send a packet when the button is pressed. */ while(1) { diff --git a/examples/rime/example-rucb.c b/examples/rime/example-rucb.c index 00e4633d7..b457d5292 100644 --- a/examples/rime/example-rucb.c +++ b/examples/rime/example-rucb.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: example-rucb.c,v 1.6 2009/10/18 17:52:08 adamdunkels Exp $ + * $Id: example-rucb.c,v 1.7 2010/01/15 10:24:37 nifi Exp $ */ /** @@ -116,7 +116,7 @@ PROCESS_THREAD(example_rucb_process, ev, data) rucb_open(&rucb, 137, &rucb_call); - button_sensor.activate(); + SENSORS_ACTIVATE(button_sensor); PROCESS_PAUSE(); diff --git a/examples/rime/example-rudolph0.c b/examples/rime/example-rudolph0.c index 8cf600d90..d718129a8 100644 --- a/examples/rime/example-rudolph0.c +++ b/examples/rime/example-rudolph0.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: example-rudolph0.c,v 1.4 2010/01/14 14:32:22 joxe Exp $ + * $Id: example-rudolph0.c,v 1.5 2010/01/15 10:24:37 nifi Exp $ */ /** @@ -124,7 +124,7 @@ PROCESS_THREAD(example_rudolph0_process, ev, data) rudolph0_open(&rudolph0, 138, &rudolph0_call); - button_sensor.configure(SENSORS_ACTIVE, (void *) 1); + SENSORS_ACTIVATE(button_sensor); while(1) { PROCESS_WAIT_EVENT_UNTIL(ev == sensors_event && diff --git a/examples/rime/example-rudolph1.c b/examples/rime/example-rudolph1.c index 1c0439a3d..89843a9e6 100644 --- a/examples/rime/example-rudolph1.c +++ b/examples/rime/example-rudolph1.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: example-rudolph1.c,v 1.6 2010/01/14 14:32:22 joxe Exp $ + * $Id: example-rudolph1.c,v 1.7 2010/01/15 10:24:37 nifi Exp $ */ /** @@ -160,7 +160,7 @@ PROCESS_THREAD(example_rudolph1_process, ev, data) rudolph1_open(&rudolph1, 140, &rudolph1_call); - button_sensor.configure(SENSORS_ACTIVE, (void *) 1); + SENSORS_ACTIVATE(button_sensor); rtimer_set(&t, RTIMER_NOW() + RTIMER_ARCH_SECOND, 1, log_queuelen, NULL); diff --git a/examples/rime/example-rudolph2.c b/examples/rime/example-rudolph2.c index 30f2fc847..4c7de1156 100644 --- a/examples/rime/example-rudolph2.c +++ b/examples/rime/example-rudolph2.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: example-rudolph2.c,v 1.5 2010/01/14 14:32:22 joxe Exp $ + * $Id: example-rudolph2.c,v 1.6 2010/01/15 10:24:37 nifi Exp $ */ /** @@ -146,7 +146,7 @@ PROCESS_THREAD(example_rudolph2_process, ev, data) rudolph2_open(&rudolph2, 142, &rudolph2_call); - button_sensor.configure(SENSORS_ACTIVE, (void *) 1); + SENSORS_ACTIVATE(button_sensor); PROCESS_PAUSE(); diff --git a/examples/rime/example-trickle.c b/examples/rime/example-trickle.c index 081d0ae38..6929fa7dd 100644 --- a/examples/rime/example-trickle.c +++ b/examples/rime/example-trickle.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: example-trickle.c,v 1.4 2010/01/14 14:32:22 joxe Exp $ + * $Id: example-trickle.c,v 1.5 2010/01/15 10:24:37 nifi Exp $ */ /** @@ -66,7 +66,7 @@ PROCESS_THREAD(example_trickle_process, ev, data) PROCESS_BEGIN(); trickle_open(&trickle, CLOCK_SECOND, 145, &trickle_call); - button_sensor.configure(SENSORS_ACTIVE, (void *) 1); + SENSORS_ACTIVATE(button_sensor); while(1) { PROCESS_WAIT_EVENT_UNTIL(ev == sensors_event &&