Copter: Guided: fix waypoint track reporting

This commit is contained in:
Leonard Hall 2021-07-08 14:20:42 +09:30 committed by Randy Mackay
parent b43f5cb2a3
commit fa0442f565
1 changed files with 2 additions and 1 deletions

View File

@ -301,7 +301,8 @@ bool ModeGuided::get_wp(Location& destination)
if (guided_mode != SubMode::WP) {
return false;
}
return wp_nav->get_oa_wp_destination(destination);
destination = Location(guided_pos_target_cm.tofloat(), guided_pos_terrain_alt ? Location::AltFrame::ABOVE_TERRAIN : Location::AltFrame::ABOVE_ORIGIN);
return true;
}
// sets guided mode's target from a Location object