Remove USE_ARDUINO_OTA from ESP32

This commit is contained in:
Theo Arends 2023-04-27 16:35:47 +02:00
parent c33472d9b6
commit 53bd49ddcd
2 changed files with 9 additions and 1 deletions

View File

@ -53,12 +53,14 @@
#include <LList.h>
#include <JsonParser.h>
#include <JsonGenerator.h>
#ifdef ESP8266
#ifdef USE_ARDUINO_OTA
#include <ArduinoOTA.h> // Arduino OTA
#ifndef USE_DISCOVERY
#define USE_DISCOVERY
#endif
#endif // USE_ARDUINO_OTA
#endif // ESP8266
#ifdef USE_DISCOVERY
#include <ESP8266mDNS.h> // MQTT, Webserver, Arduino OTA
#endif // USE_DISCOVERY
@ -642,9 +644,11 @@ void setup(void) {
AddLog(LOG_LEVEL_INFO, PSTR(D_WARNING_MINIMAL_VERSION));
#endif // FIRMWARE_MINIMAL
#ifdef ESP8266
#ifdef USE_ARDUINO_OTA
ArduinoOTAInit();
#endif // USE_ARDUINO_OTA
#endif // ESP8266
XdrvXsnsCall(FUNC_INIT); // FUNC_INIT
#ifdef USE_SCRIPT
@ -757,9 +761,11 @@ void Scheduler(void) {
if (!tasconsole_serial) { TasConsoleInput(); }
#endif // ESP32
#ifdef ESP8266
#ifdef USE_ARDUINO_OTA
ArduinoOtaLoop();
#endif // USE_ARDUINO_OTA
#endif // ESP8266
}
void loop(void) {

View File

@ -1638,7 +1638,8 @@ void Every250mSeconds(void)
}
}
#if defined(ESP8266) && defined(USE_ARDUINO_OTA)
#ifdef ESP8266
#ifdef USE_ARDUINO_OTA
/*********************************************************************************************\
* Allow updating via the Arduino OTA-protocol.
*
@ -1721,6 +1722,7 @@ void ArduinoOtaLoop(void)
while (arduino_ota_triggered) { ArduinoOTA.handle(); }
}
#endif // USE_ARDUINO_OTA
#endif // ESP8266
/********************************************************************************************/