Fixed ESP8266 build issue

This commit is contained in:
Gunnar Skjold
2024-04-13 11:38:03 +02:00
parent 8c8e14f60c
commit c74e719327
2 changed files with 8 additions and 0 deletions

View File

@@ -1652,7 +1652,11 @@ void AmsWebServer::upgradeFromUrl(String url, String nextVersion) {
httpUpdate.rebootOnUpdate(false);
httpUpdate.setFollowRedirects(HTTPC_STRICT_FOLLOW_REDIRECTS);
#if defined(ESP32)
HTTPUpdateResult ret = httpUpdate.update(client, url, currentVersion, std::bind(&AmsWebServer::updaterRequestCallback, this, std::placeholders::_1));
#else
HTTPUpdateResult ret = httpUpdate.update(client, url, currentVersion);
#endif
int lastError = httpUpdate.getLastError();
config->setUpgradeInformation(ret, ret == HTTP_UPDATE_OK ? 0 : lastError, FirmwareVersion::VersionString, nextVersion.c_str());