From 0dc8dd5394c491d97b9c5df86e2e40e343440b8b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 21 Nov 2012 22:20:14 +1100 Subject: [PATCH] SITL: run the timer_scheduler() when there are no SITL packets otherwise we can block in the ADC code --- libraries/Desktop/support/sitl.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/Desktop/support/sitl.cpp b/libraries/Desktop/support/sitl.cpp index 5b1092e390..44e983b6eb 100644 --- a/libraries/Desktop/support/sitl.cpp +++ b/libraries/Desktop/support/sitl.cpp @@ -269,12 +269,14 @@ static void timer_handler(int signum) if (update_count == 0) { sitl_update_gps(0, 0, 0, 0, 0, false); + timer_scheduler.run(); SREG = oldSREG; in_timer = false; return; } if (update_count == last_update_count) { + timer_scheduler.run(); SREG = oldSREG; in_timer = false; return;