From 39ed8be1416060849cf0168ad0426994b7eef94b Mon Sep 17 00:00:00 2001 From: Steve Evans Date: Thu, 14 Jul 2022 21:00:29 +0100 Subject: [PATCH] Don't set sleepTime to ut_delay in BARO_STATE_PRESSURE_SAMPLE state --- src/main/sensors/barometer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/sensors/barometer.c b/src/main/sensors/barometer.c index d1114f14e0..802b158610 100644 --- a/src/main/sensors/barometer.c +++ b/src/main/sensors/barometer.c @@ -456,12 +456,11 @@ uint32_t baroUpdate(timeUs_t currentTimeUs) DEBUG_SET(DEBUG_BARO, 2, baroPressure); DEBUG_SET(DEBUG_BARO, 3, baroPressureSum); - sleepTime = baro.dev.ut_delay; break; } // Where we are using a state machine call schedulerIgnoreTaskExecRate() for all states bar one - if (sleepTime != baro.dev.ut_delay) { + if (state != BARO_STATE_PRESSURE_START) { schedulerIgnoreTaskExecRate(); }