diff --git a/src/MissionManager/MissionController.cc b/src/MissionManager/MissionController.cc index bb664d1a854705c1b033be04145e37ff8bd46ce4..143ed49f9801657f2bc969cd16e5e883dd2254cd 100644 --- a/src/MissionManager/MissionController.cc +++ b/src/MissionManager/MissionController.cc @@ -1205,6 +1205,7 @@ void MissionController::_recalcFlightPathSegments(void) FlightPathSegmentHashTable oldSegmentTable = _flightPathSegmentHashTable; + _missionContainsVTOLTakeoff = false; _flightPathSegmentHashTable.clear(); _waypointPath.clear(); @@ -1244,6 +1245,7 @@ void MissionController::_recalcFlightPathSegments(void) switch (command) { case MAV_CMD_NAV_TAKEOFF: case MAV_CMD_NAV_VTOL_TAKEOFF: + _missionContainsVTOLTakeoff = command == MAV_CMD_NAV_VTOL_TAKEOFF; if (!linkEndToHome) { // If we still haven't found the first coordinate item and we hit a takeoff command this means the mission starts from the ground. // Link the first item back to home to show that. @@ -1459,7 +1461,7 @@ void MissionController::_recalcMissionFlightStatus() _resetMissionFlightStatus(); - bool vtolInHover = true; + bool vtolInHover = _missionContainsVTOLTakeoff; bool linkStartToHome = false; bool foundRTL = false; bool vehicleYawSpecificallySet = false; diff --git a/src/MissionManager/MissionController.h b/src/MissionManager/MissionController.h index be8f9561bbb6867ef4b1b79c8702d0e972de4e33..5c0872975635558ad4227e6599ab4e013fccedaf 100644 --- a/src/MissionManager/MissionController.h +++ b/src/MissionManager/MissionController.h @@ -369,6 +369,7 @@ private: bool _isROIBeginCurrentItem = false; double _minAMSLAltitude = 0; double _maxAMSLAltitude = 0; + bool _missionContainsVTOLTakeoff = false; static const char* _settingsGroup;