From 898150e460e7a861f3c45fea6c9cbb0438efcb2d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 4 Jul 2019 20:19:03 +1000 Subject: [PATCH] HAL_ChibiOS: cope with calling delay_microseconds_boost() multiple times needed for updated IMU wait code --- libraries/AP_HAL_ChibiOS/Scheduler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/Scheduler.cpp b/libraries/AP_HAL_ChibiOS/Scheduler.cpp index 5782c9849f..462f6522d2 100644 --- a/libraries/AP_HAL_ChibiOS/Scheduler.cpp +++ b/libraries/AP_HAL_ChibiOS/Scheduler.cpp @@ -163,12 +163,12 @@ void Scheduler::boost_end(void) */ void Scheduler::delay_microseconds_boost(uint16_t usec) { - if (in_main_thread()) { + if (!_priority_boosted && in_main_thread()) { set_high_priority(); _priority_boosted = true; + _called_boost = true; } delay_microseconds(usec); //Suspends Thread for desired microseconds - _called_boost = true; } /*