From d16daf5ba4c7d8c08ce48b6169c31ec1754e3ada Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Wed, 15 Jun 2016 14:29:19 -0400 Subject: [PATCH] pwm_out_sim sleep if no fds (#4829) -fixes #4828 --- src/drivers/pwm_out_sim/pwm_out_sim.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/drivers/pwm_out_sim/pwm_out_sim.cpp b/src/drivers/pwm_out_sim/pwm_out_sim.cpp index d3cb5b2542..af264d966c 100644 --- a/src/drivers/pwm_out_sim/pwm_out_sim.cpp +++ b/src/drivers/pwm_out_sim/pwm_out_sim.cpp @@ -414,7 +414,10 @@ PWMSim::task_main() _current_update_rate = _update_rate; } + /* this can happen during boot, but after the sleep its likely resolved */ if (_poll_fds_num == 0) { + usleep(1000 * 1000); + PX4_DEBUG("no valid fds"); continue; }