Plane: Remove the use of RTL_RADIUS from LOITER_UNLIM mission items

This commit is contained in:
Michael du Breuil 2020-06-19 10:27:37 -07:00 committed by Tom Pittenger
parent 645ebe21e9
commit 43526e718e
1 changed files with 2 additions and 8 deletions

View File

@ -657,14 +657,8 @@ bool Plane::verify_nav_wp(const AP_Mission::Mission_Command& cmd)
bool Plane::verify_loiter_unlim(const AP_Mission::Mission_Command &cmd)
{
if (cmd.p1 <= 1 && abs(g.rtl_radius) > 1) {
// if mission radius is 0,1, and rtl_radius is valid, use rtl_radius.
loiter.direction = (g.rtl_radius < 0) ? -1 : 1;
update_loiter(abs(g.rtl_radius));
} else {
// else use mission radius
update_loiter(cmd.p1);
}
return false;
}