chore: 📎 + fmt
This commit is contained in:
@@ -32,7 +32,7 @@ where
|
||||
let mut chunk = 0;
|
||||
loop {
|
||||
let buf = read_up_to_bytes_from_request(conn, Some(4096)).await?;
|
||||
if buf.len() == 0 {
|
||||
if buf.is_empty() {
|
||||
info!("file request for ota finished");
|
||||
let mut board = BOARD_ACCESS.get().await.lock().await;
|
||||
board.board_hal.get_esp().finalize_ota().await?;
|
||||
@@ -45,11 +45,11 @@ where
|
||||
board
|
||||
.board_hal
|
||||
.get_esp()
|
||||
.write_ota(offset as u32, &*buf)
|
||||
.write_ota(offset as u32, &buf)
|
||||
.await?;
|
||||
}
|
||||
offset = offset + buf.len();
|
||||
chunk = chunk + 1;
|
||||
offset += buf.len();
|
||||
chunk += 1;
|
||||
}
|
||||
BOARD_ACCESS
|
||||
.get()
|
||||
|
||||
Reference in New Issue
Block a user