Refactor async logging to synchronous; improve error handling consistency across modules.

This commit is contained in:
Kai Börnert
2026-04-13 17:03:47 +02:00
parent 964bdb0454
commit 8ce00c9d95
12 changed files with 104 additions and 121 deletions

View File

@@ -123,9 +123,7 @@ pub(crate) async fn get_config<T, const N: usize>(
let mut board = BOARD_ACCESS.get().await.lock().await;
let json = match saveidx {
None => serde_json::to_string(board.board_hal.get_config())?,
Some(idx) => {
board.board_hal.get_esp().load_config_slot(idx).await?
}
Some(idx) => board.board_hal.get_esp().load_config_slot(idx).await?,
};
Ok(Some(json))
}
@@ -174,7 +172,12 @@ pub(crate) async fn get_time<T, const N: usize>(
},
};
let native = board.board_hal.get_time().await.with_timezone(&tz).to_rfc3339();
let native = board
.board_hal
.get_time()
.await
.with_timezone(&tz)
.to_rfc3339();
let rtc = match board.board_hal.get_rtc_module().get_rtc_time().await {
Ok(time) => time.with_timezone(&tz).to_rfc3339(),