mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-22 12:54:14 +01:00
LP-605 call setWaypoint() on PathPlan resume
This commit is contained in:
parent
aba11f0e10
commit
6364bb8566
@ -222,7 +222,8 @@ static void pathPlannerTask()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// the transition from pathplanner to another flightmode back to pathplanner
|
// 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) {
|
if (pathplanner_active == false) {
|
||||||
pathplanner_active = true;
|
pathplanner_active = true;
|
||||||
|
|
||||||
@ -230,8 +231,11 @@ static void pathPlannerTask()
|
|||||||
FlightModeSettingsFlightModeChangeRestartsPathPlanGet(&restart);
|
FlightModeSettingsFlightModeChangeRestartsPathPlanGet(&restart);
|
||||||
if (restart == FLIGHTMODESETTINGS_FLIGHTMODECHANGERESTARTSPATHPLAN_TRUE) {
|
if (restart == FLIGHTMODESETTINGS_FLIGHTMODECHANGERESTARTSPATHPLAN_TRUE) {
|
||||||
setWaypoint(0);
|
setWaypoint(0);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
setWaypoint(waypointActive.Index);
|
||||||
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
WaypointInstGet(waypointActive.Index, &waypoint);
|
WaypointInstGet(waypointActive.Index, &waypoint);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user