Skip to content

Commit

Permalink
update progress on display
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Thieme-Garmann committed Jan 17, 2025
1 parent bf72916 commit c2f68ba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Binary file modified variants/sensebox_mcu_esp32s2/APOTA.bin
Binary file not shown.
8 changes: 7 additions & 1 deletion variants/sensebox_mcu_esp32s2/APOTA.ino
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,14 @@ void setupOTA() {

if (upload.status == UPLOAD_FILE_START) {
Serial.setDebugOutput(true);
size_t fsize = UPDATE_SIZE_UNKNOWN;
if(server.clientContentLength() > 0){
fsize = server.clientContentLength();
}
Serial.printf("Receiving Update: %s, Size: %d\n", upload.filename.c_str(), fsize);

Serial.printf("Update: %s\n", upload.filename.c_str());
if (!Update.begin(UPDATE_SIZE_UNKNOWN)) { //start with max available size
if (!Update.begin(fsize)) { //start with max available size
Update.printError(Serial);
}
} else if (upload.status == UPLOAD_FILE_WRITE) {
Expand Down

0 comments on commit c2f68ba

Please sign in to comment.