AP_InertialSensor: use delay_microseconds_boost()

this gives much more consistent timing for PX4
This commit is contained in:
Andrew Tridgell 2015-02-16 11:54:01 +11:00
parent 18131eae13
commit 9b2d44d6ed
1 changed files with 1 additions and 1 deletions

View File

@ -1085,7 +1085,7 @@ void AP_InertialSensor::wait_for_sample(void)
if (_next_sample_usec - now <=_sample_period_usec) {
// we're ahead on time, schedule next sample at expected period
uint32_t wait_usec = _next_sample_usec - now;
hal.scheduler->delay_microseconds(wait_usec);
hal.scheduler->delay_microseconds_boost(wait_usec);
uint32_t now2 = hal.scheduler->micros();
if (now2+100 < _next_sample_usec) {
timing_printf("shortsleep %u\n", (unsigned)(_next_sample_usec-now2));