AP_Baro: check baro at exactly 100Hz

prevent waits for samples
This commit is contained in:
Andrew Tridgell 2013-10-10 19:50:09 +11:00 committed by Randy Mackay
parent 499bc52c5b
commit d60a68fd9c
1 changed files with 1 additions and 3 deletions

View File

@ -291,9 +291,7 @@ void AP_Baro_MS5611::_update(void)
{ {
uint32_t tnow = hal.scheduler->micros(); uint32_t tnow = hal.scheduler->micros();
// Throttle read rate to 100hz maximum. // Throttle read rate to 100hz maximum.
// note we use 9500us here not 10000us if (tnow - _timer < 10000) {
// the read rate will end up at exactly 100hz because the Periodic Timer fires at 1khz
if (tnow - _timer < 9500) {
return; return;
} }