Skip to content

Commit

Permalink
[OTA] Fix BLE memory release when not using "latest" version (#1599)
Browse files Browse the repository at this point in the history
  • Loading branch information
1technophile authored Apr 8, 2023
1 parent 4fa74e3 commit ac0215b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions main/main.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2195,9 +2195,6 @@ void MQTTHttpsFWUpdate(char* topicOri, JsonObject& HttpsFwUpdateData) {
# endif
# ifdef ESP32
} else if (strcmp(version, "latest") == 0) {
# if defined(ZgatewayBT)
stopProcessing();
# endif
systemUrl = RELEASE_LINK + latestVersion + "/" + ENV_NAME + "-firmware.bin";
url = systemUrl.c_str();
Log.notice(F("Using system OTA url with latest version %s" CR), url);
Expand All @@ -2214,7 +2211,9 @@ void MQTTHttpsFWUpdate(char* topicOri, JsonObject& HttpsFwUpdateData) {
Log.error(F("Invalid URL" CR));
return;
}

# if defined(ZgatewayBT)
stopProcessing();
# endif
Log.warning(F("Starting firmware update" CR));
SendReceiveIndicatorON();
ErrorIndicatorON();
Expand Down

0 comments on commit ac0215b

Please sign in to comment.