mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-16 08:29:15 +01:00
OP-1858 autotakeoff pathplanner fixes
This commit is contained in:
parent
b14a966088
commit
d6de7803e1
@ -263,7 +263,7 @@ static void pathPlannerTask()
|
|||||||
|
|
||||||
// check start conditions
|
// check start conditions
|
||||||
// autotakeoff requires midpoint thrust if we are in a pending takeoff situation
|
// autotakeoff requires midpoint thrust if we are in a pending takeoff situation
|
||||||
if (pathAction.Command == PATHACTION_MODE_AUTOTAKEOFF) {
|
if (pathAction.Mode == PATHACTION_MODE_AUTOTAKEOFF) {
|
||||||
pathAction.EndCondition = PATHACTION_ENDCONDITION_LEGREMAINING;
|
pathAction.EndCondition = PATHACTION_ENDCONDITION_LEGREMAINING;
|
||||||
if ((uint8_t)pathDesired.ModeParameters[PATHDESIRED_MODEPARAMETER_AUTOTAKEOFF_CONTROLSTATE] == STATUSVTOLAUTOTAKEOFF_CONTROLSTATE_WAITFORMIDTHROTTLE) {
|
if ((uint8_t)pathDesired.ModeParameters[PATHDESIRED_MODEPARAMETER_AUTOTAKEOFF_CONTROLSTATE] == STATUSVTOLAUTOTAKEOFF_CONTROLSTATE_WAITFORMIDTHROTTLE) {
|
||||||
ManualControlCommandData cmd;
|
ManualControlCommandData cmd;
|
||||||
@ -331,7 +331,7 @@ void updatePathDesired()
|
|||||||
WaypointInstGet(waypointActive.Index, &waypoint);
|
WaypointInstGet(waypointActive.Index, &waypoint);
|
||||||
PathActionInstGet(waypoint.Action, &pathAction);
|
PathActionInstGet(waypoint.Action, &pathAction);
|
||||||
|
|
||||||
switch (pathAction.Command) {
|
switch (pathAction.Mode) {
|
||||||
case PATHACTION_MODE_AUTOTAKEOFF:
|
case PATHACTION_MODE_AUTOTAKEOFF:
|
||||||
planner_setup_pathdesired_takeoff(&pathDesired);
|
planner_setup_pathdesired_takeoff(&pathDesired);
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user