From 31093175d9ec40b005219dc05540728a05b8e84b Mon Sep 17 00:00:00 2001 From: Ryan howard Date: Tue, 25 Jun 2024 14:43:49 -0400 Subject: [PATCH] don't trigger before autobaseline is finished --- include/sensors/core/tasks/pressure_driver.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/sensors/core/tasks/pressure_driver.hpp b/include/sensors/core/tasks/pressure_driver.hpp index 090a73d59..4cabb5519 100644 --- a/include/sensors/core/tasks/pressure_driver.hpp +++ b/include/sensors/core/tasks/pressure_driver.hpp @@ -383,12 +383,12 @@ class MMR920 { hardware.reset_sync(); } } - if (bind_sync) { + if (bind_sync && + (sensor_buffer_index > AUTO_BASELINE_END || crossed_buffer_index)) { if (std::fabs(pressure - current_pressure_baseline_pa - current_moving_pressure_baseline_pa) > threshold_pascals) { hardware.set_sync(); - // force this to stay set long enough to debounce on other nodes } else { hardware.reset_sync(); }