Skip to content

Commit 8e73752

Browse files
committed
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
1 parent f7204cf commit 8e73752

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

libraries/MySensors/examples/SensebenderMicro/SensebenderMicro.ino

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
#define MEASURE_INTERVAL 60000
6868

6969
// How many milli seconds should we wait for OTA?
70-
#define OTA_WAIT_PERIOD 1000
70+
#define OTA_WAIT_PERIOD 300
7171

7272
// FORCE_TRANSMIT_INTERVAL, this number of times of wakeup, the sensor is forced to report all values to the controller
7373
#define FORCE_TRANSMIT_INTERVAL 30
@@ -140,7 +140,9 @@ void setup() {
140140

141141
pinMode(OTA_ENABLE, INPUT);
142142
digitalWrite(OTA_ENABLE, HIGH);
143-
if (!digitalRead(OTA_ENABLE)) ota_enabled = true;
143+
if (!digitalRead(OTA_ENABLE)) {
144+
ota_enabled = true;
145+
}
144146

145147
// Make sure that ATSHA204 is not floating
146148
pinMode(ATSHA204_PIN, INPUT);
@@ -178,6 +180,8 @@ void setup() {
178180
raHum.clear();
179181
sendTempHumidityMeasurements(false);
180182
sendBattLevel(false);
183+
if (ota_enabled) Serial.println("OTA FW update enabled");
184+
181185
}
182186

183187

0 commit comments

Comments
 (0)