Remove OTA timeout (#419)

* Remove OTA timeout

* Make it toggleable from debug.h
This commit is contained in:
Meia
2025-04-17 15:23:36 +02:00
committed by GitHub
parent 4e937ce79b
commit 39545d7ae7
2 changed files with 6 additions and 0 deletions

View File

@@ -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();
}
}

View File

@@ -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_