1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-01 09:24:10 +01:00

OP-1867 autoland/takeoff

Allow takeoff after land on abort when in takeoff flight mode without having to change flight mode.
This commit is contained in:
abeck70 2015-05-04 21:48:24 +10:00
parent 9a312ef115
commit 5c13db221b

View File

@ -294,6 +294,14 @@ void plan_run_AutoTakeoff()
break;
case STATUSVTOLAUTOTAKEOFF_CONTROLSTATE_ABORT:
{
FlightStatusData flightStatus;
FlightStatusGet(&flightStatus);
if (!flightStatus.Armed) {
autotakeoffState = STATUSVTOLAUTOTAKEOFF_CONTROLSTATE_WAITFORARMED;
}
}
break;
case STATUSVTOLAUTOTAKEOFF_CONTROLSTATE_POSITIONHOLD:
// nothing to do. land has been requested. stay here for forever until mode change.
default: