QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
APMBatteryIndicator.qml
Go to the documentation of this file.
1import QtQuick
2import QtQuick.Layouts
3
4import QGroundControl
5import QGroundControl.Controls
6import QGroundControl.FactControls
7
8ColumnLayout {
9 FactPanelController { id: controller }
10
11 property Fact batt1Monitor: controller.getParameterFact(-1, "BATT_MONITOR")
12 property string disabledString: qsTr("- disabled")
13
14 SettingsGroupLayout {
15 Layout.fillWidth: true
16 heading: qsTr("Low Voltage Failsafe")
17 visible: batt1Monitor.rawValue !== 0
18
19 LabelledFactComboBox {
20 label: qsTr("Vehicle Action")
21 fact: controller.getParameterFact(-1, "BATT_FS_LOW_ACT")
22 indexModel: false
23 }
24
25 FactSlider {
26 Layout.fillWidth: true
27 label: qsTr("Voltage Trigger") + (value == 0 ? disabledString : "")
28 fact: controller.getParameterFact(-1, "BATT_LOW_VOLT")
29 from: 0
30 to: 100
31 majorTickStepSize: 5
32 }
33
34 FactSlider {
35 Layout.fillWidth: true
36 label: qsTr("mAh Trigger") + (value == 0 ? disabledString : "")
37 fact: controller.getParameterFact(-1, "BATT_LOW_MAH")
38 from: 0
39 to: 30000
40 majorTickStepSize: 1000
41 }
42 }
43
44 SettingsGroupLayout {
45 Layout.fillWidth: true
46 heading: qsTr("Critical Voltage Failsafe")
47 visible: batt1Monitor.rawValue !== 0
48
49 LabelledFactComboBox {
50 label: qsTr("Vehicle Action")
51 fact: controller.getParameterFact(-1, "BATT_FS_CRT_ACT")
52 indexModel: false
53 }
54
55 FactSlider {
56 Layout.fillWidth: true
57 label: qsTr("Voltage Trigger") + (value == 0 ? disabledString : "")
58 fact: controller.getParameterFact(-1, "BATT_CRT_VOLT")
59 from: 0
60 to: 100
61 majorTickStepSize: 5
62 }
63
64 FactSlider {
65 Layout.fillWidth: true
66 label: qsTr("mAh Trigger") + (value == 0 ? disabledString : "")
67 fact: controller.getParameterFact(-1, "BATT_CRT_MAH")
68 from: 0
69 to: 30000
70 majorTickStepSize: 1000
71 }
72 }
73}