Rover: mode: use oa_wp_bearing_cd

This commit is contained in:
Peter Hall 2019-08-23 11:49:34 +01:00 committed by Randy Mackay
parent db87285153
commit d88e12b206

View File

@ -394,7 +394,7 @@ void Mode::navigate_to_waypoint()
desired_speed = calc_speed_nudge(desired_speed, g2.wp_nav.get_reversed()); desired_speed = calc_speed_nudge(desired_speed, g2.wp_nav.get_reversed());
calc_throttle(desired_speed, true); calc_throttle(desired_speed, true);
float desired_heading_cd = g2.wp_nav.wp_bearing_cd(); float desired_heading_cd = g2.wp_nav.oa_wp_bearing_cd();
if (g2.sailboat.use_indirect_route(desired_heading_cd)) { if (g2.sailboat.use_indirect_route(desired_heading_cd)) {
// sailboats use heading controller when tacking upwind // sailboats use heading controller when tacking upwind
desired_heading_cd = g2.sailboat.calc_heading(desired_heading_cd); desired_heading_cd = g2.sailboat.calc_heading(desired_heading_cd);