fix unit being wrong for solar display
This commit is contained in:
@@ -235,8 +235,8 @@ fn get_solar_state(
|
||||
) -> Result<Option<std::string::String>, anyhow::Error> {
|
||||
let mut board = BOARD_ACCESS.lock().expect("board access");
|
||||
let state = SolarState {
|
||||
mppt_voltage: board.board_hal.get_mptt_voltage()?.as_volts() as f32,
|
||||
mppt_current: board.board_hal.get_mptt_current()?.as_amperes() as f32,
|
||||
mppt_voltage: board.board_hal.get_mptt_voltage()?.as_millivolts() as f32,
|
||||
mppt_current: board.board_hal.get_mptt_current()?.as_milliamperes() as f32,
|
||||
is_day: board.board_hal.is_day(),
|
||||
};
|
||||
anyhow::Ok(Some(serde_json::to_string(&state)?))
|
||||
|
Reference in New Issue
Block a user