diff --git a/GitOTA.cpp b/GitOTA.cpp index f9c1684..850b437 100644 --- a/GitOTA.cpp +++ b/GitOTA.cpp @@ -265,7 +265,7 @@ bool GitUpdater::beginUpdate(const char *version) { this->cancelled = false; this->error = 0; this->error = this->downloadFile(); - if(this->error == 0) { + if(this->error == 0 && !this->cancelled) { strcpy(this->currentFile, "SomfyController.littlefs.bin"); this->partition = U_SPIFFS; this->error = this->downloadFile(); diff --git a/SomfyController.ino.esp32.bin b/SomfyController.ino.esp32.bin index ac294b6..ccbe722 100644 Binary files a/SomfyController.ino.esp32.bin and b/SomfyController.ino.esp32.bin differ diff --git a/Web.cpp b/Web.cpp index 8747bd4..1654e10 100644 --- a/Web.cpp +++ b/Web.cpp @@ -954,6 +954,7 @@ void Web::begin() { JsonObject sobj = sdoc.to(); git.status = GIT_UPDATE_CANCELLING; git.toJSON(sobj); + git.cancelled = true; serializeJson(sdoc, g_content); server.send(200, _encoding_json, g_content); });