From 8e73752a037a4885ffa59d657954386ae22b46e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=B8rch?= Date: Mon, 3 Aug 2015 22:56:49 +0200 Subject: [PATCH] changed wait period to 300 mili seconds (@tekka recons 100-200mSeconds is enough, just want to be on the safe side, added serial debug string to indicate OTA FW updates enabled --- .../examples/SensebenderMicro/SensebenderMicro.ino | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libraries/MySensors/examples/SensebenderMicro/SensebenderMicro.ino b/libraries/MySensors/examples/SensebenderMicro/SensebenderMicro.ino index 64ded83..87d0424 100644 --- a/libraries/MySensors/examples/SensebenderMicro/SensebenderMicro.ino +++ b/libraries/MySensors/examples/SensebenderMicro/SensebenderMicro.ino @@ -67,7 +67,7 @@ #define MEASURE_INTERVAL 60000 // How many milli seconds should we wait for OTA? -#define OTA_WAIT_PERIOD 1000 +#define OTA_WAIT_PERIOD 300 // FORCE_TRANSMIT_INTERVAL, this number of times of wakeup, the sensor is forced to report all values to the controller #define FORCE_TRANSMIT_INTERVAL 30 @@ -140,7 +140,9 @@ void setup() { pinMode(OTA_ENABLE, INPUT); digitalWrite(OTA_ENABLE, HIGH); - if (!digitalRead(OTA_ENABLE)) ota_enabled = true; + if (!digitalRead(OTA_ENABLE)) { + ota_enabled = true; + } // Make sure that ATSHA204 is not floating pinMode(ATSHA204_PIN, INPUT); @@ -178,6 +180,8 @@ void setup() { raHum.clear(); sendTempHumidityMeasurements(false); sendBattLevel(false); + if (ota_enabled) Serial.println("OTA FW update enabled"); + }