diff --git a/tasmota/tasmota.ino b/tasmota/tasmota.ino index ec4a65f08..8e98f8002 100644 --- a/tasmota/tasmota.ino +++ b/tasmota/tasmota.ino @@ -53,12 +53,14 @@ #include #include #include +#ifdef ESP8266 #ifdef USE_ARDUINO_OTA #include // Arduino OTA #ifndef USE_DISCOVERY #define USE_DISCOVERY #endif #endif // USE_ARDUINO_OTA +#endif // ESP8266 #ifdef USE_DISCOVERY #include // 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) { diff --git a/tasmota/tasmota_support/support_tasmota.ino b/tasmota/tasmota_support/support_tasmota.ino index 955f52816..c3cec04fd 100644 --- a/tasmota/tasmota_support/support_tasmota.ino +++ b/tasmota/tasmota_support/support_tasmota.ino @@ -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 /********************************************************************************************/