add water todo

This commit is contained in:
Empire 2025-03-21 23:38:15 +01:00
parent db27de3073
commit 4b1f2b9ca7
3 changed files with 3 additions and 0 deletions

View File

@ -438,6 +438,7 @@ fn safe_main() -> anyhow::Result<()> {
let mut water_frozen = false;
//multisample should be moved to water_temperature_c
let mut attempt = 1;
let water_temp: Result<f32, anyhow::Error> = loop {
let temp = board.water_temperature_c();

View File

@ -441,6 +441,7 @@ impl PlantCtrlBoard<'_> {
self.solar_is_day.get_level().into()
}
//should be multsampled
pub fn water_temperature_c(&mut self) -> Result<f32> {
let mut delay = Delay::new_default();

View File

@ -254,6 +254,7 @@ fn tank_info(
let mut board = BOARD_ACCESS.lock().unwrap();
let config = board.get_config()?;
let tank_info = determine_tank_state(&mut board, &config);
//should be multsampled
let water_temp = board.water_temperature_c();
Ok(Some(serde_json::to_string(
&tank_info.as_mqtt_info(&config.tank, water_temp),