RTL_OPTIONS ignore pilot yaw not working?

Hi all,

I’m testing copter-4.1.5 on SITL and RTL_OPTIONS = 4 doesn’t seem to be working. However, AUTO_OPTIONS = 4 is working fine. I’m trying to track down the problem in the code but I can’t find anything wrong in the mode_rtl.cpp file. Any thoughts?

1 Like

I think I found the problem. The handling of the pilot’s yaw input in the function Mode::land_run_horizontal_control() must be as shown below for RTL_OPTIONS to work properly:

target_yaw_rate = 0;
if (!copter.failsafe.radio && use_pilot_yaw() ) {
// get pilot’s desired yaw rate
target_yaw_rate = get_pilot_desired_yaw_rate(channel_yaw->get_control_in());
if (!is_zero(target_yaw_rate)) {
auto_yaw.set_mode(AUTO_YAW_HOLD);
}
}

Can you do a github pull request with those changes?

Done.

1 Like

Thanks for doing that