From 82e32d0c0ccceeaa30c99d98b36ef7d9d41b8978 Mon Sep 17 00:00:00 2001 From: Tyler Slabinski Date: Thu, 23 May 2024 16:17:17 -0400 Subject: Set comparator to default on continuous pulse --- src/devices/features/tier2.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/devices') diff --git a/src/devices/features/tier2.rs b/src/devices/features/tier2.rs index 4eb989e..5f25b41 100644 --- a/src/devices/features/tier2.rs +++ b/src/devices/features/tier2.rs @@ -143,7 +143,7 @@ where /// provides a continuous-conversion ready pulse when in /// continuous-conversion mode. /// - /// When calling this the comparator will be disabled and the thresholds will be cleared. + /// When calling this the comparator will be reset to default and the thresholds will be cleared. pub fn use_alert_rdy_pin_as_ready(&mut self) -> Result<(), Error> { if self.config != self @@ -151,7 +151,7 @@ where .with_high(BF::COMP_QUE1) .with_high(BF::COMP_QUE0) { - self.disable_comparator()?; + self.set_comparator_queue(ComparatorQueue::default())?; } self.write_register(Register::HIGH_TH, 0x8000)?; self.write_register(Register::LOW_TH, 0) -- cgit v1.2.3-54-g00ecf