Unverified Commit 45d9249b authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #6642 from DonLakeFlyer/LandAlt

Fix _LAND altitude
parents 5e4c477b 8051da9c
...@@ -733,6 +733,7 @@ void SimpleMissionItem::setDefaultsForCommand(void) ...@@ -733,6 +733,7 @@ void SimpleMissionItem::setDefaultsForCommand(void)
{ {
// We set these global defaults first, then if there are param defaults they will get reset // We set these global defaults first, then if there are param defaults they will get reset
_altitudeMode = AltitudeRelative; _altitudeMode = AltitudeRelative;
emit altitudeModeChanged();
double defaultAlt = qgcApp()->toolbox()->settingsManager()->appSettings()->defaultMissionItemAltitude()->rawValue().toDouble(); double defaultAlt = qgcApp()->toolbox()->settingsManager()->appSettings()->defaultMissionItemAltitude()->rawValue().toDouble();
_altitudeFact.setRawValue(defaultAlt); _altitudeFact.setRawValue(defaultAlt);
_missionItem._param7Fact.setRawValue(defaultAlt); _missionItem._param7Fact.setRawValue(defaultAlt);
...@@ -760,6 +761,7 @@ void SimpleMissionItem::setDefaultsForCommand(void) ...@@ -760,6 +761,7 @@ void SimpleMissionItem::setDefaultsForCommand(void)
case MAV_CMD_NAV_LAND: case MAV_CMD_NAV_LAND:
case MAV_CMD_NAV_VTOL_LAND: case MAV_CMD_NAV_VTOL_LAND:
_altitudeFact.setRawValue(0);
_missionItem.setParam7(0); _missionItem.setParam7(0);
break; break;
default: default:
......
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