RC_Channel: fixed k_manual for set_servo_limit()

this allows for failsafe takeover of k_manual channels, which fixes
the behaviour for ignition failsafe
This commit is contained in:
Andrew Tridgell 2014-08-09 16:53:14 +10:00
parent d1a75874a1
commit 2e5913df93

View File

@ -292,6 +292,11 @@ RC_Channel_aux::set_servo_limit(RC_Channel_aux::Aux_servo_function_t function, R
if (ch && ch->function.get() == function) {
uint16_t pwm = ch->get_limit_pwm(limit);
ch->radio_out = pwm;
if (ch->function.get() == k_manual) {
// in order for output_ch() to work for k_manual we
// also have to override radio_in
ch->radio_in = pwm;
}
}
}
}