mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2025-12-13 02:52:11 +01:00
Cancel update when cancel button is pressed.
This commit is contained in:
parent
51f7a0700b
commit
f1386011c3
3 changed files with 2 additions and 1 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Binary file not shown.
1
Web.cpp
1
Web.cpp
|
|
@ -954,6 +954,7 @@ void Web::begin() {
|
|||
JsonObject sobj = sdoc.to<JsonObject>();
|
||||
git.status = GIT_UPDATE_CANCELLING;
|
||||
git.toJSON(sobj);
|
||||
git.cancelled = true;
|
||||
serializeJson(sdoc, g_content);
|
||||
server.send(200, _encoding_json, g_content);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue