QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
ProximityRadarValues.qml
Go to the documentation of this file.
1import QtQuick
2
3/// Object which exposes vehicle distanceSensors FactGroup information for use in UI
4QtObject {
5 property var vehicle
6
7 property bool telemetryAvailable: vehicle && vehicle.distanceSensors.telemetryAvailable
8
9 signal rotationValueChanged ///< Signalled when any available rotation value changes
10
11 property real rotationNoneValue: _distanceSensors ? _distanceSensors.rotationNone.value : NaN
12 property real rotationYaw45Value: _distanceSensors ? _distanceSensors.rotationYaw45.value : NaN
13 property real rotationYaw90Value: _distanceSensors ? _distanceSensors.rotationYaw90.value : NaN
14 property real rotationYaw135Value: _distanceSensors ? _distanceSensors.rotationYaw135.value : NaN
15 property real rotationYaw180Value: _distanceSensors ? _distanceSensors.rotationYaw180.value : NaN
16 property real rotationYaw225Value: _distanceSensors ? _distanceSensors.rotationYaw225.value : NaN
17 property real rotationYaw270Value: _distanceSensors ? _distanceSensors.rotationYaw270.value : NaN
18 property real rotationYaw315Value: _distanceSensors ? _distanceSensors.rotationYaw315.value : NaN
19 property real maxDistance: _distanceSensors ? _distanceSensors.maxDistance.value : NaN
20
21 property string rotationNoneValueString: _distanceSensors ? _distanceSensors.rotationNone.valueString : _noValueStr
22 property string rotationYaw45ValueString: _distanceSensors ? _distanceSensors.rotationYaw45.valueString : _noValueStr
23 property string rotationYaw90ValueString: _distanceSensors ? _distanceSensors.rotationYaw90.valueString : _noValueStr
24 property string rotationYaw135ValueString: _distanceSensors ? _distanceSensors.rotationYaw135.valueString : _noValueStr
25 property string rotationYaw180ValueString: _distanceSensors ? _distanceSensors.rotationYaw180.valueString : _noValueStr
26 property string rotationYaw225ValueString: _distanceSensors ? _distanceSensors.rotationYaw225.valueString : _noValueStr
27 property string rotationYaw270ValueString: _distanceSensors ? _distanceSensors.rotationYaw270.valueString : _noValueStr
28 property string rotationYaw315ValueString: _distanceSensors ? _distanceSensors.rotationYaw315.valueString : _noValueStr
29
30 property var rgRotationValues: [ rotationNoneValue, rotationYaw45Value, rotationYaw90Value, rotationYaw135Value, rotationYaw180Value, rotationYaw225Value, rotationYaw270Value, rotationYaw315Value ]
31 property var rgRotationValueStrings: [ rotationNoneValueString, rotationYaw45ValueString, rotationYaw90ValueString, rotationYaw135ValueString, rotationYaw180ValueString, rotationYaw225ValueString, rotationYaw270ValueString, rotationYaw315ValueString ]
32
33 property var _distanceSensors: vehicle ? vehicle.distanceSensors : null
34 property string _noValueStr: qsTr("–.––")
35
36 onRotationNoneValueChanged: rotationValueChanged()
37 onRotationYaw45ValueChanged: rotationValueChanged()
38 onRotationYaw90ValueChanged: rotationValueChanged()
39 onRotationYaw135ValueChanged: rotationValueChanged()
40 onRotationYaw180ValueChanged: rotationValueChanged()
41 onRotationYaw225ValueChanged: rotationValueChanged()
42 onRotationYaw270ValueChanged: rotationValueChanged()
43 onRotationYaw315ValueChanged: rotationValueChanged()
44}