QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
VehicleWarnings.qml
Go to the documentation of this file.
1import QtQuick
2
3import QGroundControl
4import QGroundControl.Controls
5
6Rectangle {
7 anchors.margins: -ScreenTools.defaultFontPixelHeight
8 height: warningsCol.height
9 width: warningsCol.width
10 color: Qt.rgba(1, 1, 1, 0.5)
11 radius: ScreenTools.defaultFontPixelWidth / 2
12 visible: _noGPSLockVisible || _prearmErrorVisible
13
14 property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
15 property bool _noGPSLockVisible: _activeVehicle && _activeVehicle.requiresGpsFix && !_activeVehicle.coordinate.isValid
16 property bool _prearmErrorVisible: _activeVehicle && !_activeVehicle.armed && _activeVehicle.prearmError && !_activeVehicle.healthAndArmingCheckReport.supported
17
18 Column {
19 id: warningsCol
20 spacing: ScreenTools.defaultFontPixelHeight
21
22 QGCLabel {
23 anchors.horizontalCenter: parent.horizontalCenter
24 visible: _noGPSLockVisible
25 color: "black"
26 font.pointSize: ScreenTools.largeFontPointSize
27 text: qsTr("No GPS Lock for Vehicle")
28 }
29
30 QGCLabel {
31 anchors.horizontalCenter: parent.horizontalCenter
32 visible: _prearmErrorVisible
33 color: "black"
34 font.pointSize: ScreenTools.largeFontPointSize
35 text: _activeVehicle ? _activeVehicle.prearmError : ""
36 }
37
38 QGCLabel {
39 anchors.horizontalCenter: parent.horizontalCenter
40 visible: _prearmErrorVisible
41 width: ScreenTools.defaultFontPixelWidth * 50
42 horizontalAlignment: Text.AlignHCenter
43 wrapMode: Text.WordWrap
44 color: "black"
45 font.pointSize: ScreenTools.largeFontPointSize
46 text: qsTr("The vehicle has failed a pre-arm check. In order to arm the vehicle, resolve the failure.")
47 }
48 }
49}