fix progress display

This commit is contained in:
2025-09-23 00:43:19 +02:00
parent 1f3349c348
commit b594a02870
2 changed files with 43 additions and 3 deletions

View File

@@ -295,6 +295,14 @@ impl Handler for HttpHandler {
}
chunk = chunk + 1;
}
BOARD_ACCESS
.get()
.await
.lock()
.await
.board_hal
.clear_progress()
.await;
Some(200)
}
Method::Post => {
@@ -328,7 +336,14 @@ impl Handler for HttpHandler {
offset = offset + to_write;
chunk = chunk + 1;
}
BOARD_ACCESS
.get()
.await
.lock()
.await
.board_hal
.clear_progress()
.await;
Some(200)
}
_ => None,
@@ -460,6 +475,14 @@ where
if is_last {
let actual_crc = checksum.finalize();
if actual_crc != expected_crc {
BOARD_ACCESS
.get()
.await
.lock()
.await
.board_hal
.clear_progress()
.await;
conn.initiate_response(
409,
Some(
@@ -503,7 +526,14 @@ where
}
chunk += 1;
}
BOARD_ACCESS
.get()
.await
.lock()
.await
.board_hal
.clear_progress()
.await;
Ok(())
}
@@ -545,6 +575,7 @@ where
.get_rtc_module()
.backup_config_finalize(checksum.finalize(), offset)
.await?;
board.board_hal.clear_progress().await;
Ok(Some("saved".to_owned()))
}