Merge pull request #4032 from ascillato/patch-1

Fix Compiler Warning for Core STAGE SDK 3.0.0
This commit is contained in:
Theo Arends 2018-10-11 16:17:41 +02:00 committed by GitHub
commit d34054bef4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -2037,7 +2037,12 @@ void Every250mSeconds()
#endif // BE_MINIMAL #endif // BE_MINIMAL
snprintf_P(log_data, sizeof(log_data), PSTR(D_LOG_UPLOAD "%s"), mqtt_data); snprintf_P(log_data, sizeof(log_data), PSTR(D_LOG_UPLOAD "%s"), mqtt_data);
AddLog(LOG_LEVEL_DEBUG); 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)); 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) { if (!ota_result) {
#ifndef BE_MINIMAL #ifndef BE_MINIMAL
int ota_error = ESPhttpUpdate.getLastError(); int ota_error = ESPhttpUpdate.getLastError();