From 69cf4106b2542eeeab41a11a50512f6ecd0b655c Mon Sep 17 00:00:00 2001
From: Darrell
Date: Thu, 7 Jul 2022 23:22:55 -0400
Subject: [PATCH] Fix updating for esp32c3 (#530)
---
src/main.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/main.h b/src/main.h
index ef4f04f..5822011 100644
--- a/src/main.h
+++ b/src/main.h
@@ -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();