From 5c13db221bef1332d59312a4fc0ad2a8a113176b Mon Sep 17 00:00:00 2001 From: abeck70 Date: Mon, 4 May 2015 21:48:24 +1000 Subject: [PATCH] OP-1867 autoland/takeoff Allow takeoff after land on abort when in takeoff flight mode without having to change flight mode. --- flight/libraries/plans.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/flight/libraries/plans.c b/flight/libraries/plans.c index bd69d7df6..4005a9d6f 100644 --- a/flight/libraries/plans.c +++ b/flight/libraries/plans.c @@ -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: