From 3b5fa2d8e50bd8707d971af6f7d6c01493ce94df Mon Sep 17 00:00:00 2001 From: fros4943 Date: Mon, 25 Feb 2008 16:34:56 +0000 Subject: [PATCH] added 5 second delay before actually burning the node id (may otherwise cause problems with the .upload script) --- platform/sky/apps/burn-nodeid.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/platform/sky/apps/burn-nodeid.c b/platform/sky/apps/burn-nodeid.c index a04810550..fac8b7a20 100644 --- a/platform/sky/apps/burn-nodeid.c +++ b/platform/sky/apps/burn-nodeid.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: burn-nodeid.c,v 1.3 2008/02/11 10:43:47 adamdunkels Exp $ + * $Id: burn-nodeid.c,v 1.4 2008/02/25 16:34:56 fros4943 Exp $ */ /** @@ -42,9 +42,12 @@ #include "dev/watchdog.h" #include "node-id.h" #include "contiki.h" +#include "sys/etimer.h" #include +static struct etimer etimer; + PROCESS(burn_process, "Burn node id"); AUTOSTART_PROCESSES(&burn_process); /*---------------------------------------------------------------------------*/ @@ -52,6 +55,9 @@ PROCESS_THREAD(burn_process, ev, data) { PROCESS_BEGIN(); + etimer_set(&etimer, 5*CLOCK_SECOND); + PROCESS_WAIT_UNTIL(etimer_expired(&etimer)); + watchdog_stop(); leds_on(LEDS_RED); #if NODEID