Fix updating for esp32c3 (#530)
This commit is contained in:
parent
f5b56326f0
commit
69cf4106b2
|
@ -198,9 +198,14 @@ void firmwareUpdate()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
updateInProgress = true;
|
updateInProgress = true;
|
||||||
|
NimBLEDevice::getScan()->stop();
|
||||||
fingerprints.setDisable(updateInProgress);
|
fingerprints.setDisable(updateInProgress);
|
||||||
GUI::updateStart();
|
GUI::updateStart();
|
||||||
httpUpdate.setFollowRedirects(HTTPC_FORCE_FOLLOW_REDIRECTS);
|
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);
|
t_httpUpdate_return ret = httpUpdate.update(client, firmwareUrl);
|
||||||
GUI::updateEnd();
|
GUI::updateEnd();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue