Refactor async logging to synchronous; improve error handling consistency across modules.
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user