add water todo
This commit is contained in:
		| @@ -438,6 +438,7 @@ fn safe_main() -> anyhow::Result<()> { | |||||||
|  |  | ||||||
|     let mut water_frozen = false; |     let mut water_frozen = false; | ||||||
|  |  | ||||||
|  |     //multisample should be moved to water_temperature_c | ||||||
|     let mut attempt = 1; |     let mut attempt = 1; | ||||||
|     let water_temp: Result<f32, anyhow::Error> = loop { |     let water_temp: Result<f32, anyhow::Error> = loop { | ||||||
|         let temp = board.water_temperature_c(); |         let temp = board.water_temperature_c(); | ||||||
|   | |||||||
| @@ -441,6 +441,7 @@ impl PlantCtrlBoard<'_> { | |||||||
|         self.solar_is_day.get_level().into() |         self.solar_is_day.get_level().into() | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     //should be multsampled | ||||||
|     pub fn water_temperature_c(&mut self) -> Result<f32> { |     pub fn water_temperature_c(&mut self) -> Result<f32> { | ||||||
|         let mut delay = Delay::new_default(); |         let mut delay = Delay::new_default(); | ||||||
|  |  | ||||||
|   | |||||||
| @@ -254,6 +254,7 @@ fn tank_info( | |||||||
|     let mut board = BOARD_ACCESS.lock().unwrap(); |     let mut board = BOARD_ACCESS.lock().unwrap(); | ||||||
|     let config = board.get_config()?; |     let config = board.get_config()?; | ||||||
|     let tank_info = determine_tank_state(&mut board, &config); |     let tank_info = determine_tank_state(&mut board, &config); | ||||||
|  |     //should be multsampled | ||||||
|     let water_temp = board.water_temperature_c(); |     let water_temp = board.water_temperature_c(); | ||||||
|     Ok(Some(serde_json::to_string( |     Ok(Some(serde_json::to_string( | ||||||
|         &tank_info.as_mqtt_info(&config.tank, water_temp), |         &tank_info.as_mqtt_info(&config.tank, water_temp), | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user