6import QGroundControl.Controls
7import QGroundControl.FactControls
10 Layout.fillWidth: true
11 heading: qsTr("Return to Launch")
12 visible: activeVehicle.multiRotor
14 property var activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
15 property Fact rtlAltFact: controller.getParameterFact(-1, "RTL_ALT")
17 FactPanelController { id: controller }
20 Layout.fillWidth: true
21 spacing: ScreenTools.defaultFontPixelWidth * 2
25 Layout.fillWidth: true
26 text: qsTr("Return At")
32 model: [ qsTr("Current altitude"), qsTr("Specified altitude") ]
34 function setCurrentIndex() {
35 if (rtlAltFact.value === 0) {
36 returnAtCombo.currentIndex = 0
38 returnAtCombo.currentIndex = 1
42 Component.onCompleted: setCurrentIndex()
44 onActivated: (index) => {
46 rtlAltFact.rawValue = 0
48 rtlAltFact.rawValue = 1500
54 onRawValueChanged: returnAtCombo.setCurrentIndex()
60 enabled: rtlAltFact.rawValue !== 0