1
0
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:
abeck70 2015-04-29 20:27:30 +10:00
parent b14a966088
commit d6de7803e1

View File

@ -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;