From 1228f58808770145e1fdb2e41546edb2f99dcb63 Mon Sep 17 00:00:00 2001 From: Claas Date: Fri, 5 Dec 2025 22:39:31 +0100 Subject: [PATCH] Remove unused poll logic --- fan-controller/src/task.rs | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/fan-controller/src/task.rs b/fan-controller/src/task.rs index 609dc6b..86e3aa0 100644 --- a/fan-controller/src/task.rs +++ b/fan-controller/src/task.rs @@ -565,28 +565,6 @@ async fn keep_alive( } } -async fn poll_sensors(fans: ModbusOnceLock) { - loop { - let mut fans = fans.get().await.lock().await; - let fans = fans.deref_mut(); - - let temperature = match fans.get_temperature(fan::Fan::One).await { - Ok(temperature) => temperature, - Err(modbus::client::Error::Timeout(_)) => { - error!("Timeout getting temperature for fan 1"); - return; - } - Err(modbus::client::Error::Uart(error)) => { - error!("Uart error getting temperature for fan 1: {:?}", error); - return; - } - }; - - Timer::after_secs(10).await; - todo!("Send temperature to Home Assistant"); - } -} - const SUBSCRIBE_OPTIONS: mqtt::packet::subscribe::Options = mqtt::packet::subscribe::Options::new( QualityOfService::AtMostOnceDelivery, false, -- 2.51.2