Fix updating for esp32c3 (#530)

This commit is contained in:
Darrell 2022-07-07 23:22:55 -04:00 committed by GitHub
parent f5b56326f0
commit 69cf4106b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -198,9 +198,14 @@ void firmwareUpdate()
#endif
updateInProgress = true;
NimBLEDevice::getScan()->stop();
fingerprints.setDisable(updateInProgress);
GUI::updateStart();
httpUpdate.setFollowRedirects(HTTPC_FORCE_FOLLOW_REDIRECTS);
httpUpdate.onProgress([](int progress, int total)
{
GUI::updateProgress((progress / (total / 100)));
});
t_httpUpdate_return ret = httpUpdate.update(client, firmwareUrl);
GUI::updateEnd();