Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions src/AutoPilotPlugins/APM/APMSafetyComponent.qml
Original file line number Diff line number Diff line change
Expand Up @@ -661,13 +661,7 @@ SetupPage {
Column {
spacing: _margins / 2

property Fact _rtlAltFact: {
if (controller.firmwareMajorVersion < 4 || (controller.firmwareMajorVersion === 4 && controller.firmwareMinorVersion < 5)) {
return controller.getParameterFact(-1, "ALT_HOLD_RTL")
} else {
return controller.getParameterFact(-1, "RTL_ALTITUDE")
}
}
property Fact _rtlAltFact: controller.getParameterFact(-1, "r.RTL_ALTITUDE")

QGCLabel {
text: qsTr("Return to Launch")
Expand Down
9 changes: 1 addition & 8 deletions src/AutoPilotPlugins/APM/APMSafetyComponentPlane.qml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,7 @@ SetupPage {
property Fact _failsafeThrEnable: controller.getParameterFact(-1, "THR_FAILSAFE")
property Fact _failsafeThrValue: controller.getParameterFact(-1, "THR_FS_VALUE")
property Fact _failsafeGCSEnable: controller.getParameterFact(-1, "FS_GCS_ENABL")

property Fact _rtlAltFact: {
if (controller.firmwareMajorVersion < 4 || (controller.firmwareMajorVersion === 4 && controller.firmwareMinorVersion < 5)) {
return controller.getParameterFact(-1, "ALT_HOLD_RTL")
} else {
return controller.getParameterFact(-1, "RTL_ALTITUDE")
}
}
property Fact _rtlAltFact: controller.getParameterFact(-1, "r.RTL_ALTITUDE")

property real _margins: ScreenTools.defaultFontPixelHeight

Expand Down
2 changes: 1 addition & 1 deletion src/AutoPilotPlugins/APM/APMSafetyComponentSummary.qml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ Item {
valueText: fact ? (fact.value < 0 ? qsTr("current") : fact.valueString + " " + fact.units) : ""
visible: controller.vehicle.fixedWing

property Fact fact: controller.getParameterFact(-1, "ALT_HOLD_RTL", false /* reportMissing */)
property Fact fact: controller.getParameterFact(-1, "r.RTL_ALTITUDE", false /* reportMissing */)
}
}
}
9 changes: 1 addition & 8 deletions src/AutoPilotPlugins/APM/APMSafetyComponentSummaryPlane.qml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,7 @@ Item {
property Fact _failsafeThrEnable: controller.getParameterFact(-1, "THR_FAILSAFE")
property Fact _failsafeThrValue: controller.getParameterFact(-1, "THR_FS_VALUE")
property Fact _failsafeGCSEnable: controller.getParameterFact(-1, "FS_GCS_ENABL")

property Fact _rtlAltFact: {
if (controller.firmwareMajorVersion < 4 || (controller.firmwareMajorVersion === 4 && controller.firmwareMinorVersion < 5)) {
return controller.getParameterFact(-1, "ALT_HOLD_RTL")
} else {
return controller.getParameterFact(-1, "RTL_ALTITUDE")
}
}
property Fact _rtlAltFact: controller.getParameterFact(-1, "r.RTL_ALTITUDE")

Column {
anchors.fill: parent
Expand Down
2 changes: 2 additions & 0 deletions src/FirmwarePlugin/APM/ArduPlaneFirmwarePlugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ ArduPlaneFirmwarePlugin::ArduPlaneFirmwarePlugin(QObject *parent)

remapV4_5["AIRSPEED_MIN"] = QStringLiteral("ARSPD_FBW_MIN");
remapV4_5["AIRSPEED_MAX"] = QStringLiteral("ARSPD_FBW_MAX");
remapV4_5["RTL_ALTITUDE"] = QStringLiteral("ALT_HOLD_RTL");
// LAND_SPEED is only used in a Copter component

_remapParamNameIntialized = true;
}
Expand Down
Loading