From d60a68fd9c8b1d288efc8a6f1cdce8c1348972ba Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 10 Oct 2013 19:50:09 +1100 Subject: [PATCH] AP_Baro: check baro at exactly 100Hz prevent waits for samples --- libraries/AP_Baro/AP_Baro_MS5611.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libraries/AP_Baro/AP_Baro_MS5611.cpp b/libraries/AP_Baro/AP_Baro_MS5611.cpp index fbf9ece822..88e70c9cd6 100644 --- a/libraries/AP_Baro/AP_Baro_MS5611.cpp +++ b/libraries/AP_Baro/AP_Baro_MS5611.cpp @@ -291,9 +291,7 @@ void AP_Baro_MS5611::_update(void) { uint32_t tnow = hal.scheduler->micros(); // Throttle read rate to 100hz maximum. - // note we use 9500us here not 10000us - // the read rate will end up at exactly 100hz because the Periodic Timer fires at 1khz - if (tnow - _timer < 9500) { + if (tnow - _timer < 10000) { return; }