From c4bd0ec88d8f2a8b45a585993d1bf9c9963028da Mon Sep 17 00:00:00 2001 From: Shabir Mohamed Date: Mon, 15 Jun 2015 10:47:45 +0530 Subject: [PATCH] re-enabled watch-dog timer reset in sensebot code --- .../sketches/sensebot/SenseBotEthernetAgent.ino | 14 +++++++------- .../sketches/sensebot_wifi/SenseBotWifiAgent.ino | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/modules/distribution/src/sketches/sensebot/SenseBotEthernetAgent.ino b/modules/distribution/src/sketches/sensebot/SenseBotEthernetAgent.ino index 81b0bb1b..7a45f5a2 100644 --- a/modules/distribution/src/sketches/sensebot/SenseBotEthernetAgent.ino +++ b/modules/distribution/src/sketches/sensebot/SenseBotEthernetAgent.ino @@ -59,7 +59,7 @@ void setup() { connectHttp(); setupResource(); -// wdt_enable(WDTO_4S); + wdt_enable(WDTO_4S); } @@ -71,12 +71,12 @@ void loop() { // listen(); // wdt_reset(); // Check connection -// if( !cc3000.checkConnected() ){ -// while(1){ -// } -// } + if( !cc3000.checkConnected() ){ + while(1){ + } + } -// wdt_reset(); + wdt_reset(); drive(); } @@ -117,7 +117,7 @@ static int protothread1(struct pt *pt, int interval) { // batches all the required pin values together and pushes once // Pushes data in 1 second interval pushData(); -// wdt_reset(); + wdt_reset(); } else { pushClient.close(); cc3000.disconnect(); diff --git a/modules/distribution/src/sketches/sensebot_wifi/SenseBotWifiAgent.ino b/modules/distribution/src/sketches/sensebot_wifi/SenseBotWifiAgent.ino index 59640e87..95d0f8e0 100644 --- a/modules/distribution/src/sketches/sensebot_wifi/SenseBotWifiAgent.ino +++ b/modules/distribution/src/sketches/sensebot_wifi/SenseBotWifiAgent.ino @@ -59,7 +59,7 @@ void setup() { connectHttp(); setupResource(); -// wdt_enable(WDTO_4S); + wdt_enable(WDTO_4S); } @@ -71,12 +71,12 @@ void loop() { // listen(); // wdt_reset(); // Check connection -// if( !cc3000.checkConnected() ){ -// while(1){ -// } -// } + if( !cc3000.checkConnected() ){ + while(1){ + } + } -// wdt_reset(); + wdt_reset(); drive(); } @@ -117,7 +117,7 @@ static int protothread1(struct pt *pt, int interval) { // batches all the required pin values together and pushes once // Pushes data in 1 second interval pushData(); -// wdt_reset(); + wdt_reset(); } else { pushClient.close(); cc3000.disconnect();