mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
Add RTH waypoint action
This commit is contained in:
parent
3eac69e953
commit
d4488512c0
@ -128,6 +128,14 @@ static void pathPlannerTask(void *parameters)
|
||||
positionDesired.East = waypoint.Position[WAYPOINT_POSITION_EAST];
|
||||
positionDesired.Down = waypoint.Position[WAYPOINT_POSITION_DOWN];
|
||||
PositionDesiredSet(&positionDesired);
|
||||
} else if (waypointAction == WAYPOINT_ACTION_RTH) {
|
||||
// Fly back to the home location but 20 m above it
|
||||
PositionDesiredData positionDesired;
|
||||
PositionDesiredGet(&positionDesired);
|
||||
positionDesired.North = 0;
|
||||
positionDesired.East = 0;
|
||||
positionDesired.Down = -20;
|
||||
PositionDesiredSet(&positionDesired);
|
||||
}
|
||||
}
|
||||
vTaskDelay(10);
|
||||
|
@ -4,7 +4,7 @@
|
||||
<field name="Position" units="m" type="float" elementnames="North, East, Down"/>
|
||||
<field name="Velocity" units="m/s" type="float" elementnames="North, East, Down"/>
|
||||
<field name="YawDesired" units="deg" type="float" elements="1"/>
|
||||
<field name="Action" units="" type="enum" elements="1" options="Next,RTH,Loiter10s"/>
|
||||
<field name="Action" units="" type="enum" elements="1" options="Next,RTH,Loiter10s,Land"/>
|
||||
<access gcs="readwrite" flight="readwrite"/>
|
||||
<telemetrygcs acked="false" updatemode="manual" period="0"/>
|
||||
<telemetryflight acked="false" updatemode="onchange" period="0"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user