From ebcffcb0ac43b4220ee6d073a295ed9d21ddaedf Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 23 Nov 2017 14:20:51 +1100 Subject: [PATCH] HAL_SITL: fixed console printf in SITL examples --- libraries/AP_HAL_SITL/HAL_SITL_Class.cpp | 1 + libraries/AP_HAL_SITL/Scheduler.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/AP_HAL_SITL/HAL_SITL_Class.cpp b/libraries/AP_HAL_SITL/HAL_SITL_Class.cpp index b0c1bde2fd..be9a70619b 100644 --- a/libraries/AP_HAL_SITL/HAL_SITL_Class.cpp +++ b/libraries/AP_HAL_SITL/HAL_SITL_Class.cpp @@ -86,6 +86,7 @@ void HAL_SITL::run(int argc, char * const argv[], Callbacks* callbacks) const for (;;) { callbacks->loop(); + sitlScheduler._run_io_procs(false); } } diff --git a/libraries/AP_HAL_SITL/Scheduler.h b/libraries/AP_HAL_SITL/Scheduler.h index 14595243cd..effea60193 100644 --- a/libraries/AP_HAL_SITL/Scheduler.h +++ b/libraries/AP_HAL_SITL/Scheduler.h @@ -50,6 +50,8 @@ public: uint64_t stopped_clock_usec() const { return _stopped_clock_usec; } + static void _run_io_procs(bool called_from_isr); + private: SITL_State *_sitlState; uint8_t _nested_atomic_ctr; @@ -58,7 +60,6 @@ private: static AP_HAL::Proc _failsafe; static void _run_timer_procs(bool called_from_isr); - static void _run_io_procs(bool called_from_isr); static volatile bool _timer_suspended; static volatile bool _timer_event_missed;