Sub: use renamed AC_WPNav::get_yaw_cd and check is active

This commit is contained in:
Randy Mackay 2024-08-28 13:13:13 +09:00
parent 305f668e12
commit 0f59779bca
1 changed files with 1 additions and 2 deletions

View File

@ -826,8 +826,7 @@ float ModeGuided::get_auto_heading()
default:
// point towards next waypoint.
// we don't use wp_bearing because we don't want the vehicle to turn too much during flight
return sub.wp_nav.get_yaw();
break;
return sub.wp_nav.is_active() ? sub.wp_nav.get_yaw_cd() : sub.pos_control.get_yaw_cd();
}
}
// guided_limit_set - set guided timeout and movement limits