HAL_SITL: use SIM_RC_FAIL

This commit is contained in:
Andrew Tridgell 2013-12-20 09:40:43 +11:00
parent 5eac5fb26f
commit 765bfbfe43

View File

@ -261,7 +261,7 @@ void SITL_State::_timer_handler(int signum)
#endif
// simulate RC input at 50Hz
if (hal.scheduler->millis() - last_pwm_input >= 20) {
if (hal.scheduler->millis() - last_pwm_input >= 20 && _sitl->rc_fail == 0) {
last_pwm_input = hal.scheduler->millis();
pwm_valid = true;
}