From a33030b62228ef35a6cd64083e6c773ef4910912 Mon Sep 17 00:00:00 2001 From: Adrian Scillato <35405447+ascillato@users.noreply.github.com> Date: Thu, 11 Oct 2018 10:54:34 -0300 Subject: [PATCH] Fixed Compiler Warning for Core STAGE SDK 3.0.0 --- sonoff/sonoff.ino | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sonoff/sonoff.ino b/sonoff/sonoff.ino index 23ee2a27d..d9453e3c4 100755 --- a/sonoff/sonoff.ino +++ b/sonoff/sonoff.ino @@ -2037,7 +2037,12 @@ void Every250mSeconds() #endif // BE_MINIMAL snprintf_P(log_data, sizeof(log_data), PSTR(D_LOG_UPLOAD "%s"), mqtt_data); AddLog(LOG_LEVEL_DEBUG); +#if defined(ARDUINO_ESP8266_RELEASE_2_3_0) || defined(ARDUINO_ESP8266_RELEASE_2_4_0) || defined(ARDUINO_ESP8266_RELEASE_2_4_1) || defined(ARDUINO_ESP8266_RELEASE_2_4_2) ota_result = (HTTP_UPDATE_FAILED != ESPhttpUpdate.update(mqtt_data)); +#else + // If using core stage or 2.5.0+ the syntax has changed + ota_result = (HTTP_UPDATE_FAILED != ESPhttpUpdate.update(EspClient, mqtt_data)); +#endif if (!ota_result) { #ifndef BE_MINIMAL int ota_error = ESPhttpUpdate.getLastError();