Unverified Commit 88575cd6 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #8739 from DonLakeFlyer/VTOLHoverCruise

Fix VTOL hover determination
parents aa0d8af6 5ad5e3e0
...@@ -1205,6 +1205,7 @@ void MissionController::_recalcFlightPathSegments(void) ...@@ -1205,6 +1205,7 @@ void MissionController::_recalcFlightPathSegments(void)
FlightPathSegmentHashTable oldSegmentTable = _flightPathSegmentHashTable; FlightPathSegmentHashTable oldSegmentTable = _flightPathSegmentHashTable;
_missionContainsVTOLTakeoff = false;
_flightPathSegmentHashTable.clear(); _flightPathSegmentHashTable.clear();
_waypointPath.clear(); _waypointPath.clear();
...@@ -1244,6 +1245,7 @@ void MissionController::_recalcFlightPathSegments(void) ...@@ -1244,6 +1245,7 @@ void MissionController::_recalcFlightPathSegments(void)
switch (command) { switch (command) {
case MAV_CMD_NAV_TAKEOFF: case MAV_CMD_NAV_TAKEOFF:
case MAV_CMD_NAV_VTOL_TAKEOFF: case MAV_CMD_NAV_VTOL_TAKEOFF:
_missionContainsVTOLTakeoff = command == MAV_CMD_NAV_VTOL_TAKEOFF;
if (!linkEndToHome) { 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. // 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. // Link the first item back to home to show that.
...@@ -1459,7 +1461,7 @@ void MissionController::_recalcMissionFlightStatus() ...@@ -1459,7 +1461,7 @@ void MissionController::_recalcMissionFlightStatus()
_resetMissionFlightStatus(); _resetMissionFlightStatus();
bool vtolInHover = true; bool vtolInHover = _missionContainsVTOLTakeoff;
bool linkStartToHome = false; bool linkStartToHome = false;
bool foundRTL = false; bool foundRTL = false;
bool vehicleYawSpecificallySet = false; bool vehicleYawSpecificallySet = false;
......
...@@ -369,6 +369,7 @@ private: ...@@ -369,6 +369,7 @@ private:
bool _isROIBeginCurrentItem = false; bool _isROIBeginCurrentItem = false;
double _minAMSLAltitude = 0; double _minAMSLAltitude = 0;
double _maxAMSLAltitude = 0; double _maxAMSLAltitude = 0;
bool _missionContainsVTOLTakeoff = false;
static const char* _settingsGroup; static const char* _settingsGroup;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment