QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
RCRSSIIndicator.qml
Go to the documentation of this file.
1import QtQuick
2import QtQuick.Layouts
3
4import QGroundControl
5import QGroundControl.Controls
6
7//-------------------------------------------------------------------------
8//-- RC RSSI Indicator
9Item {
10 id: control
11 width: rssiRow.width * 1.1
12 anchors.top: parent.top
13 anchors.bottom: parent.bottom
14
15 property bool showIndicator: _activeVehicle.supports.radio && _rcRSSIAvailable
16
17 property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
18 property bool _rcRSSIAvailable: _activeVehicle.rcRSSI > 0 && _activeVehicle.rcRSSI <= 100
19
20 Component {
21 id: rcRSSIInfoPage
22
23 ToolIndicatorPage {
24 showExpand: false
25
26 contentComponent: SettingsGroupLayout {
27 heading: qsTr("RC RSSI Status")
28
29 LabelledLabel {
30 label: qsTr("RSSI")
31 labelText: _activeVehicle.rcRSSI + "%"
32 }
33 }
34 }
35 }
36
37 Row {
38 id: rssiRow
39 anchors.top: parent.top
40 anchors.bottom: parent.bottom
41 spacing: ScreenTools.defaultFontPixelWidth
42
43 QGCColoredImage {
44 width: height
45 anchors.top: parent.top
46 anchors.bottom: parent.bottom
47 sourceSize.height: height
48 source: "/qmlimages/RC.svg"
49 fillMode: Image.PreserveAspectFit
50 opacity: _rcRSSIAvailable ? 1 : 0.5
51 color: qgcPal.buttonText
52 }
53
54 SignalStrength {
55 anchors.verticalCenter: parent.verticalCenter
56 size: parent.height * 0.5
57 percent: _rcRSSIAvailable ? _activeVehicle.rcRSSI : 0
58 }
59 }
60
61 MouseArea {
62 anchors.fill: parent
63 onClicked: mainWindow.showIndicatorDrawer(rcRSSIInfoPage, control)
64 }
65}