From 17751fdc045c24b88f8c8a1e98c6314bd203d444 Mon Sep 17 00:00:00 2001 From: Astro Date: Thu, 30 Jun 2022 22:15:31 +0200 Subject: [PATCH] overlay/pi-sensors: fix shit --- overlay/pi-sensors/src/dht.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/overlay/pi-sensors/src/dht.rs b/overlay/pi-sensors/src/dht.rs index 15d260be..80420432 100644 --- a/overlay/pi-sensors/src/dht.rs +++ b/overlay/pi-sensors/src/dht.rs @@ -25,7 +25,7 @@ impl Sensor for DHT22 { fn read(&mut self) -> Vec { let mut delay_us = |d: u16| { // We are using here more accurate delays than in std library - spin_sleep::sleep(Duration::from_micros(2 * (d as u64))); + spin_sleep::sleep(Duration::from_micros(d as u64)); }; self.pin.switch_output(); @@ -34,7 +34,6 @@ impl Sensor for DHT22 { } self.pin.switch_input(); - // match dht_read(DhtType::DHT22, &mut opin, &mut delay_us) { match dht_split_read(DhtType::DHT22, &mut self.pin, &mut delay_us) { Ok(readings) => vec![ Measurement::new(self.location.clone(), "temperature", readings.temperature()),