mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-02 10:24:11 +01:00
Add a waypoint above home for the box pattern.
This commit is contained in:
parent
9bd49ded4f
commit
24636eb5f4
@ -126,6 +126,8 @@ static void pathPlannerTask(void *parameters)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This method determines if we have achieved the goal of the active
|
||||||
|
// waypoint
|
||||||
checkTerminationCondition();
|
checkTerminationCondition();
|
||||||
|
|
||||||
if(pathplanner_active == false) {
|
if(pathplanner_active == false) {
|
||||||
@ -313,30 +315,35 @@ static void createPathBox()
|
|||||||
waypoint.Velocity[0] = 2; // Since for now this isn't directional just set a mag
|
waypoint.Velocity[0] = 2; // Since for now this isn't directional just set a mag
|
||||||
waypoint.Action = WAYPOINT_ACTION_PATHTONEXT;
|
waypoint.Action = WAYPOINT_ACTION_PATHTONEXT;
|
||||||
|
|
||||||
waypoint.Position[0] = 5;
|
waypoint.Position[0] = 0;
|
||||||
waypoint.Position[1] = 5;
|
waypoint.Position[1] = 0;
|
||||||
waypoint.Position[2] = -10;
|
waypoint.Position[2] = -10;
|
||||||
WaypointInstSet(0, &waypoint);
|
WaypointInstSet(0, &waypoint);
|
||||||
|
|
||||||
waypoint.Position[0] = -5;
|
waypoint.Position[0] = 5;
|
||||||
waypoint.Position[1] = 5;
|
waypoint.Position[1] = 5;
|
||||||
|
waypoint.Position[2] = -10;
|
||||||
WaypointInstSet(1, &waypoint);
|
WaypointInstSet(1, &waypoint);
|
||||||
|
|
||||||
waypoint.Position[0] = -5;
|
waypoint.Position[0] = -5;
|
||||||
waypoint.Position[1] = -5;
|
waypoint.Position[1] = 5;
|
||||||
WaypointInstSet(2, &waypoint);
|
WaypointInstSet(2, &waypoint);
|
||||||
|
|
||||||
waypoint.Position[0] = 5;
|
waypoint.Position[0] = -5;
|
||||||
waypoint.Position[1] = -5;
|
waypoint.Position[1] = -5;
|
||||||
WaypointInstSet(3, &waypoint);
|
WaypointInstSet(3, &waypoint);
|
||||||
|
|
||||||
waypoint.Position[0] = 5;
|
waypoint.Position[0] = 5;
|
||||||
waypoint.Position[1] = 5;
|
waypoint.Position[1] = -5;
|
||||||
WaypointInstSet(4, &waypoint);
|
WaypointInstSet(4, &waypoint);
|
||||||
|
|
||||||
|
waypoint.Position[0] = 5;
|
||||||
|
waypoint.Position[1] = 5;
|
||||||
|
WaypointInstSet(5, &waypoint);
|
||||||
|
|
||||||
waypoint.Position[0] = 0;
|
waypoint.Position[0] = 0;
|
||||||
waypoint.Position[1] = 0;
|
waypoint.Position[1] = 0;
|
||||||
WaypointInstSet(5, &waypoint);
|
WaypointInstSet(6, &waypoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void createPathLogo()
|
static void createPathLogo()
|
||||||
|
Loading…
Reference in New Issue
Block a user