mirror of
https://github.com/SlimeVR/SlimeVR-Tracker-ESP.git
synced 2026-04-06 02:01:57 +02:00
Remove OTA timeout (#419)
* Remove OTA timeout * Make it toggleable from debug.h
This commit is contained in:
@@ -64,12 +64,14 @@ void OTA::otaSetup(const char * const otaPassword) {
|
||||
|
||||
void OTA::otaUpdate() {
|
||||
if(enabled) {
|
||||
#if USE_OTA_TIMEOUT
|
||||
if(bootTime + 60000 < millis()) {
|
||||
// Disable OTA 60 seconds after boot as protection measure
|
||||
enabled = false;
|
||||
Serial.println("[NOTICE] OTA updates disabled by timeout, this is not an error");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
ArduinoOTA.handle();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,4 +110,8 @@
|
||||
#define DEBUG_MEASURE_SENSOR_TIME_TAKEN false
|
||||
#endif
|
||||
|
||||
#ifndef USE_OTA_TIMEOUT
|
||||
#define USE_OTA_TIMEOUT false
|
||||
#endif
|
||||
|
||||
#endif // SLIMEVR_DEBUG_H_
|
||||
|
||||
Reference in New Issue
Block a user