Commit 312d2652 authored by Stefan Dunca's avatar Stefan Dunca

Take default Rally Point Relative Altitude for fixed wing from Default Mission Altitude

parent b3818e21
......@@ -243,7 +243,12 @@ void RallyPointController::addPoint(QGeoCoordinate point)
if (_points.count()) {
defaultAlt = qobject_cast<RallyPoint*>(_points[_points.count() - 1])->coordinate().altitude();
} else {
defaultAlt = RallyPoint::getDefaultFactAltitude();
if(_masterController->controllerVehicle()->fixedWing()) {
defaultAlt = qgcApp()->toolbox()->settingsManager()->appSettings()->defaultMissionItemAltitude()->rawValue().toDouble();
}
else {
defaultAlt = RallyPoint::getDefaultFactAltitude();
}
}
point.setAltitude(defaultAlt);
RallyPoint* newPoint = new RallyPoint(point, this);
......
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