integrate battery state update into full codebase

This commit is contained in:
2025-06-20 19:05:06 +02:00
parent 506f0c36b5
commit 71973f8fe9
4 changed files with 82 additions and 54 deletions

View File

@@ -223,7 +223,7 @@ fn get_battery_state(
) -> Result<Option<std::string::String>, anyhow::Error> {
let mut board = BOARD_ACCESS.lock().expect("board access");
let battery_state = board.board_hal.get_battery_monitor().get_battery_state();
anyhow::Ok(Some(battery_state))
anyhow::Ok(Some(serde_json::to_string(&battery_state)?))
}
fn get_log(