Browse Source

Merge pull request #8739 from DonLakeFlyer/VTOLHoverCruise

Fix VTOL hover determination
QGC4.4
Don Gagne 5 years ago committed by GitHub
parent
commit
88575cd641
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/MissionManager/MissionController.cc
  2. 1
      src/MissionManager/MissionController.h

4
src/MissionManager/MissionController.cc

@ -1205,6 +1205,7 @@ void MissionController::_recalcFlightPathSegments(void) @@ -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) @@ -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() @@ -1459,7 +1461,7 @@ void MissionController::_recalcMissionFlightStatus()
_resetMissionFlightStatus();
bool vtolInHover = true;
bool vtolInHover = _missionContainsVTOLTakeoff;
bool linkStartToHome = false;
bool foundRTL = false;
bool vehicleYawSpecificallySet = false;

1
src/MissionManager/MissionController.h

@ -369,6 +369,7 @@ private: @@ -369,6 +369,7 @@ private:
bool _isROIBeginCurrentItem = false;
double _minAMSLAltitude = 0;
double _maxAMSLAltitude = 0;
bool _missionContainsVTOLTakeoff = false;
static const char* _settingsGroup;

Loading…
Cancel
Save