fix suplicate battery encoding on website

This commit is contained in:
Empire Phoenix 2025-06-20 03:11:45 +02:00
parent c84e863d0f
commit 017078ef8e

View File

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