Handle OTA actively when MQTT is not connected (#1307)
* Handle OTA actively when MQTT is not connected Resolves #1292 * Fix compilation for targets not having OTA * ArduinoOTA.handle() only with non-ESP targets * OTA check before reboot: fix condition and add more comments Signed-off-by: Sami Salonen <ssalonen@gmail.com>
This commit is contained in:
1 parent
62553dc2dd
commit
3d589ffa90
2 files changed
+41
-2
No files matched your search
@@ -380,6 +380,13 @@ int lowpowermode = DEFAULT_LOW_POWER_MODE;
|
||||
#ifndef ota_port
|
||||
# define ota_port 8266
|
||||
#endif
|
||||
// timeout for OTA activities
|
||||
// OTA upload with no activity in this period is considered inactive
|
||||
// As long as OTA upload is considered "active", we avoid rebooting e.g.
|
||||
// in case of failures connecting to MQTT
|
||||
#ifndef ota_timeout_millis
|
||||
# define ota_timeout_millis 30000
|
||||
#endif
|
||||
|
||||
/*-------------DEFINE PINs FOR STATUS LEDs----------------*/
|
||||
#ifndef LED_SEND_RECEIVE
|
||||
|
||||
Reference in new issue
Block a user