1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-03-15 07:29:15 +01:00

Merged in julian_lilov/librepilot-jdl/LP-605_PathPlan_Resume_Fix (pull request #522)

LP-605 PathPlan 'Resume' Fix

Approved-by: Lalanne Laurent <f5soh@free.fr>
This commit is contained in:
Julian Lilov 2019-02-21 20:36:27 +00:00 committed by Lalanne Laurent
commit e846b300fe

View File

@ -222,7 +222,8 @@ static void pathPlannerTask()
}
// the transition from pathplanner to another flightmode back to pathplanner
// triggers a reset back to 0 index in the waypoint list
// triggers a reset back either to 0 index in the waypoint list,
// or to current index in the waypoint list, depending on FlightModeChangeRestartsPathPlan setting
if (pathplanner_active == false) {
pathplanner_active = true;
@ -230,8 +231,10 @@ static void pathPlannerTask()
FlightModeSettingsFlightModeChangeRestartsPathPlanGet(&restart);
if (restart == FLIGHTMODESETTINGS_FLIGHTMODECHANGERESTARTSPATHPLAN_TRUE) {
setWaypoint(0);
return;
} else {
setWaypoint(waypointActive.Index);
}
return;
}
WaypointInstGet(waypointActive.Index, &waypoint);