From 66e6ce165620e77419669e0f65d155cb426d8fe3 Mon Sep 17 00:00:00 2001 From: fros4943 Date: Mon, 2 Apr 2007 16:31:28 +0000 Subject: [PATCH] minor changes --- platform/cooja/testbutton.c | 7 +++---- platform/cooja/testetimer.c | 6 +++--- platform/cooja/testserial.c | 14 +++++++------- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/platform/cooja/testbutton.c b/platform/cooja/testbutton.c index a2b77ce79..b496fc9bd 100644 --- a/platform/cooja/testbutton.c +++ b/platform/cooja/testbutton.c @@ -26,10 +26,9 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: testbutton.c,v 1.2 2007/03/22 10:04:47 fros4943 Exp $ + * $Id: testbutton.c,v 1.3 2007/04/02 16:31:28 fros4943 Exp $ */ - #include "contiki.h" #include "sys/loader.h" @@ -60,10 +59,10 @@ PROCESS_THREAD(button_test_process, ev, data) while(1) { PROCESS_WAIT_EVENT(); - if (button_sensor.value(0)) { + if (ev == sensors_event && data == &button_sensor && button_sensor.value(0)) { custom_counter++; - sprintf(logMess, "button> Button pressed (counter=%i)\n", custom_counter); + sprintf(logMess, "Button pressed (counter=%i)\n", custom_counter); log_message(logMess, ""); } } diff --git a/platform/cooja/testetimer.c b/platform/cooja/testetimer.c index 44b1cea91..140bc4290 100644 --- a/platform/cooja/testetimer.c +++ b/platform/cooja/testetimer.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: testetimer.c,v 1.1 2006/08/21 12:11:17 fros4943 Exp $ + * $Id: testetimer.c,v 1.2 2007/04/02 16:31:28 fros4943 Exp $ */ @@ -59,7 +59,7 @@ PROCESS_THREAD(etimer_test_process, ev, data) etimer_set(&mytimer, 1111); - sprintf(logMess, "Starting ETimer test process (counter=%i)\n", custom_counter); + sprintf(logMess, "Starting event timer test process (counter=%i)\n", custom_counter); log_message(logMess, ""); while(1) { @@ -67,7 +67,7 @@ PROCESS_THREAD(etimer_test_process, ev, data) if (etimer_expired(&mytimer)) { custom_counter++; - sprintf(logMess, "etimer> Timed out(counter=%i)\n", custom_counter); + sprintf(logMess, "Timed out (counter=%i)\n", custom_counter); log_message(logMess, ""); etimer_restart(&mytimer); diff --git a/platform/cooja/testserial.c b/platform/cooja/testserial.c index 3d316948f..a6c370ac7 100644 --- a/platform/cooja/testserial.c +++ b/platform/cooja/testserial.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: testserial.c,v 1.1 2006/08/21 12:11:16 fros4943 Exp $ + * $Id: testserial.c,v 1.2 2007/04/02 16:31:28 fros4943 Exp $ */ @@ -58,22 +58,22 @@ PROCESS_THREAD(serial_test_process, ev, data) etimer_set(&mytimer, CLOCK_SECOND); - /* Starts the serial process among other */ - serial_init(); + /* Starts the serial process among other */ + serial_init(); - log_message("serial> Starting test process\n", ""); + log_message("Starting serial test process\n", ""); while(1) { PROCESS_WAIT_EVENT(); if (etimer_expired(&mytimer)) { - log_message("serial> Sending serial data now\n", ""); + log_message("Sending serial data now\n", ""); etimer_restart(&mytimer); - rs232_print("GNU's not Unix\n"); + rs232_print("GNU's not Unix\n"); } if(ev == serial_event_message) { - log_message("serial> Message received: ", data); + log_message("Message received: ", data); } }