From 787b983b1ba31b54ba386a47a7a1496e8c58f30b Mon Sep 17 00:00:00 2001 From: Ryan howard Date: Tue, 25 Jun 2024 15:10:33 -0400 Subject: [PATCH] forgot to change an old reference --- include/sensors/core/tasks/pressure_driver.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sensors/core/tasks/pressure_driver.hpp b/include/sensors/core/tasks/pressure_driver.hpp index 69690d91e..c3c052d55 100644 --- a/include/sensors/core/tasks/pressure_driver.hpp +++ b/include/sensors/core/tasks/pressure_driver.hpp @@ -421,7 +421,7 @@ class MMR920 { sensor_buffer->begin() + AUTO_BASELINE_START, sensor_buffer->begin() + AUTO_BASELINE_END, 0) / (AUTO_BASELINE_END - AUTO_BASELINE_START); - for (auto i = sensor_buffer_index - AUTO_BASELINE_SAMPLES; + for (auto i = sensor_buffer_index - AUTO_BASELINE_END; i < sensor_buffer_index; i++) { // apply the moving baseline to older samples to so that // data is in the same format as later samples, don't apply