From 0556557d8b7b45af76d0103c17c7d4a31b33c446 Mon Sep 17 00:00:00 2001 From: Harald Pichler Date: Fri, 28 Oct 2016 11:43:55 +0200 Subject: [PATCH] remove unneeded code --- apps/arduino/arduino-process.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/apps/arduino/arduino-process.c b/apps/arduino/arduino-process.c index 56a04d50d..5ac3dd7f3 100644 --- a/apps/arduino/arduino-process.c +++ b/apps/arduino/arduino-process.c @@ -56,7 +56,6 @@ #include "adc.h" #include "hw-arduino.h" #include "contiki.h" -#include "net/netstack.h" #define DEBUG 0 #if DEBUG @@ -111,26 +110,21 @@ PROCESS(arduino_sketch, "Arduino Sketch Wrapper"); #define LOOP_INTERVAL (1 * CLOCK_SECOND) #endif -#ifndef SLEEP_NETWORK_INTERVAL -#define SLEEP_NETWORK_INTERVAL (60 * CLOCK_SECOND) -#endif - PROCESS_THREAD(arduino_sketch, ev, data) { static struct etimer loop_periodic_timer; - static struct etimer network_off_periodic_timer; + PROCESS_BEGIN(); adc_init (); mcu_sleep_init (); setup (); /* Define application-specific events here. */ etimer_set(&loop_periodic_timer, LOOP_INTERVAL); - etimer_set(&network_off_periodic_timer, SLEEP_NETWORK_INTERVAL); + while (1) { PROCESS_WAIT_EVENT(); #if PLATFORM_HAS_BUTTON if(ev == sensors_event && data == &button_sensor) { - NETSTACK_MAC.off(1); mcu_sleep_off(); PRINTF("*******BUTTON*******\n"); @@ -143,11 +137,6 @@ PROCESS_THREAD(arduino_sketch, ev, data) } #endif /* PLATFORM_HAS_BUTTON */ - if(etimer_expired(&network_off_periodic_timer)) { -// NETSTACK_MAC.off(0); - NETSTACK_MAC.on(); - etimer_reset(&network_off_periodic_timer); - } if(etimer_expired(&loop_periodic_timer)) { mcu_sleep_off(); loop (); @@ -158,7 +147,6 @@ PROCESS_THREAD(arduino_sketch, ev, data) PROCESS_END(); } - /* * VI settings, see coding style * ex:ts=8:et:sw=2