QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
APMMainStatusIndicator.qml
Go to the documentation of this file.
1import QtQuick
2import QtQuick.Controls
3import QtQuick.Layouts
4
5import QGroundControl
6import QGroundControl.Controls
7import QGroundControl.FactControls
8
9ColumnLayout {
10 spacing: ScreenTools.defaultFontPixelHeight / 2
11
12 FactPanelController { id: controller }
13
14 SettingsGroupLayout {
15 heading: qsTr("Ground Control Comm Loss Failsafe")
16 Layout.fillWidth: true
17
18 LabelledFactComboBox {
19 label: qsTr("Vehicle Action")
20 fact: controller.getParameterFact(-1, "FS_GCS_ENABLE")
21 indexModel: false
22 }
23
24 FactSlider {
25 Layout.fillWidth: true
26 Layout.preferredWidth: ScreenTools.defaultFontPixelWidth * 20
27 label: qsTr("Loss Timeout")
28 fact: controller.getParameterFact(-1, "FS_GCS_TIMEOUT")
29 majorTickStepSize: 5
30 }
31 }
32
33 SettingsGroupLayout {
34 heading: qsTr("Failsafe Options")
35 Layout.fillWidth: true
36
37 Repeater {
38 id: repeater
39 model: fact ? fact.bitmaskStrings : []
40
41 property Fact fact: controller.getParameterFact(-1, "FS_OPTIONS")
42
43 QGCCheckBoxSlider {
44 Layout.fillWidth: true
45 text: modelData
46 checked: fact.value & fact.bitmaskValues[index]
47
48 property Fact fact: repeater.fact
49
50 onClicked: {
51 var i
52 var otherCheckbox
53 if (checked) {
54 fact.value |= fact.bitmaskValues[index]
55 } else {
56 fact.value &= ~fact.bitmaskValues[index]
57 }
58 }
59 }
60 }
61 }
62}