Browse Source

Adding data link loss and removing COM_DL_LOSS_EN.

QGC4.4
dogmaphobic 9 years ago committed by Lorenz Meier
parent
commit
fb57f430bd
  1. 2
      qgcresources.qrc
  2. 26
      src/AutoPilotPlugins/PX4/Images/DatalinkLoss.svg
  3. 23
      src/AutoPilotPlugins/PX4/Images/DatalinkLossLight.svg
  4. 94
      src/AutoPilotPlugins/PX4/SafetyComponent.qml
  5. 22
      src/AutoPilotPlugins/PX4/SafetyComponentSummary.qml

2
qgcresources.qrc

@ -49,6 +49,8 @@
<file alias="FirmwareUpgradeIcon.png">src/VehicleSetup/FirmwareUpgradeIcon.png</file> <file alias="FirmwareUpgradeIcon.png">src/VehicleSetup/FirmwareUpgradeIcon.png</file>
<file alias="FlightModesComponentIcon.png">src/AutoPilotPlugins/PX4/Images/FlightModesComponentIcon.png</file> <file alias="FlightModesComponentIcon.png">src/AutoPilotPlugins/PX4/Images/FlightModesComponentIcon.png</file>
<file alias="CameraComponentIcon.png">src/AutoPilotPlugins/PX4/Images/CameraComponentIcon.png</file> <file alias="CameraComponentIcon.png">src/AutoPilotPlugins/PX4/Images/CameraComponentIcon.png</file>
<file alias="DatalinkLoss.svg">src/AutoPilotPlugins/PX4/Images/DatalinkLoss.svg</file>
<file alias="DatalinkLossLight.svg">src/AutoPilotPlugins/PX4/Images/DatalinkLossLight.svg</file>
<file alias="GeoFence.svg">src/AutoPilotPlugins/PX4/Images/GeoFence.svg</file> <file alias="GeoFence.svg">src/AutoPilotPlugins/PX4/Images/GeoFence.svg</file>
<file alias="GeoFenceLight.svg">src/AutoPilotPlugins/PX4/Images/GeoFenceLight.svg</file> <file alias="GeoFenceLight.svg">src/AutoPilotPlugins/PX4/Images/GeoFenceLight.svg</file>
<file alias="LandMode.svg">src/AutoPilotPlugins/PX4/Images/LandMode.svg</file> <file alias="LandMode.svg">src/AutoPilotPlugins/PX4/Images/LandMode.svg</file>

26
src/AutoPilotPlugins/PX4/Images/DatalinkLoss.svg

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="194 896 87.1 74.8" style="enable-background:new 194 896 87.1 74.8;" xml:space="preserve">
<style type="text/css">
.st0{fill:#FFFFFF;}
.st1{fill:none;stroke:#FFFFFF;stroke-width:5.4819;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
.st2{fill:none;stroke:#A10000;stroke-width:10;stroke-linecap:round;stroke-miterlimit:10;}
</style>
<g>
<path class="st0" d="M198.2,910.3c0.4-0.7,0.9-1,1.6-1l67.1,0.1c0.4,0,0.7,0.1,1.1,0.3c0.3,0.2,0.5,0.5,0.6,0.9
c0.3,0.7,0.1,1.4-0.4,2L228,954.5c-0.4,0.4-0.9,0.6-1.5,0.6c-0.3,0-0.6-0.2-0.9-0.3c-0.2-0.1-0.4-0.3-0.5-0.5L214.7,938l-6.9,3.2
c-0.7,0.3-1.3,0.3-1.9-0.1s-0.8-1-0.8-1.7l1.4-14l-8.4-13.1C197.9,911.6,197.9,911,198.2,910.3L198.2,910.3z M203.3,913.1l6.5,10.2
c0,0.1,0.1,0.2,0.1,0.4l0.1,0.2l45.2-10.7L203.3,913.1z M210.4,925.7l-1.1,10.6l51.8-22.6L210.4,925.7z M217.1,935
c0.3,0.3,0.6,0.6,0.8,0.9l9.1,14.3l32.1-33.4L217.1,935z"/>
<g>
<path id="path3890" inkscape:connector-curvature="0" class="st1" d="M249.8,952.8c6.2,6.2,16.4,6.2,22.7,0
c6.2-6.2,6.2-16.4,0-22.7"/>
<path id="path3892" inkscape:connector-curvature="0" class="st1" d="M255.5,945.3c2.7,2.7,7,2.7,9.7,0c2.7-2.7,2.7-7,0-9.7"/>
</g>
</g>
<g>
<line class="st2" x1="207.1" y1="963.9" x2="268" y2="903"/>
<line class="st2" x1="268" y1="963.9" x2="207.1" y2="902.9"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

23
src/AutoPilotPlugins/PX4/Images/DatalinkLossLight.svg

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="194 896 87.1 74.8" style="enable-background:new 194 896 87.1 74.8;" xml:space="preserve">
<style type="text/css">
.st0{fill:none;stroke:#000000;stroke-width:5.4819;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
.st1{fill:none;stroke:#CB2027;stroke-width:10;stroke-linecap:round;stroke-miterlimit:10;}
</style>
<path d="M198.2,910.3c0.4-0.7,0.9-1,1.6-1l67.1,0.1c0.4,0,0.7,0.1,1.1,0.3c0.3,0.2,0.5,0.5,0.6,0.9c0.3,0.7,0.1,1.4-0.4,2L228,954.5
c-0.4,0.4-0.9,0.6-1.5,0.6c-0.3,0-0.6-0.2-0.9-0.3c-0.2-0.1-0.4-0.3-0.5-0.5L214.7,938l-6.9,3.2c-0.7,0.3-1.3,0.3-1.9-0.1
s-0.8-1-0.8-1.7l1.4-14l-8.4-13.1C197.9,911.6,197.9,911,198.2,910.3L198.2,910.3z M203.3,913.1l6.5,10.2c0,0.1,0.1,0.2,0.1,0.4
l0.1,0.2l45.2-10.7L203.3,913.1z M210.4,925.7l-1.1,10.6l51.8-22.6L210.4,925.7z M217.1,935c0.3,0.3,0.6,0.6,0.8,0.9l9.1,14.3
l32.1-33.4L217.1,935z"/>
<g>
<path id="path3890" inkscape:connector-curvature="0" class="st0" d="M249.8,952.8c6.2,6.2,16.4,6.2,22.7,0
c6.2-6.2,6.2-16.4,0-22.7"/>
<path id="path3892" inkscape:connector-curvature="0" class="st0" d="M255.5,945.3c2.7,2.7,7,2.7,9.7,0c2.7-2.7,2.7-7,0-9.7"/>
</g>
<g>
<line class="st1" x1="207.1" y1="963.9" x2="268" y2="903"/>
<line class="st1" x1="268" y1="963.9" x2="207.1" y2="902.9"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

94
src/AutoPilotPlugins/PX4/SafetyComponent.qml

@ -46,7 +46,6 @@ QGCView {
property real _margins: ScreenTools.defaultFontPixelHeight property real _margins: ScreenTools.defaultFontPixelHeight
property real _middleRowWidth: ScreenTools.defaultFontPixelWidth * 22 property real _middleRowWidth: ScreenTools.defaultFontPixelWidth * 22
property real _editFieldWidth: ScreenTools.defaultFontPixelWidth * 18 property real _editFieldWidth: ScreenTools.defaultFontPixelWidth * 18
property bool _fixedWing: controller.fixedWing
property Fact _fenceAction: controller.getParameterFact(-1, "GF_ACTION") property Fact _fenceAction: controller.getParameterFact(-1, "GF_ACTION")
property Fact _fenceRadius: controller.getParameterFact(-1, "GF_MAX_HOR_DIST") property Fact _fenceRadius: controller.getParameterFact(-1, "GF_MAX_HOR_DIST")
@ -54,6 +53,7 @@ QGCView {
property Fact _rtlLandDelay: controller.getParameterFact(-1, "RTL_LAND_DELAY") property Fact _rtlLandDelay: controller.getParameterFact(-1, "RTL_LAND_DELAY")
property Fact _lowBattAction: controller.getParameterFact(-1, "COM_LOW_BAT_ACT") property Fact _lowBattAction: controller.getParameterFact(-1, "COM_LOW_BAT_ACT")
property Fact _rcLossAction: controller.getParameterFact(-1, "NAV_RCL_ACT") property Fact _rcLossAction: controller.getParameterFact(-1, "NAV_RCL_ACT")
property Fact _dlLossAction: controller.getParameterFact(-1, "NAV_DLL_ACT")
QGCViewPanel { QGCViewPanel {
id: panel id: panel
@ -100,7 +100,7 @@ QGCView {
spacing: _margins * 0.5 spacing: _margins * 0.5
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
Row { Row {
visible: !_fixedWing visible: !controller.fixedWing
QGCLabel { QGCLabel {
anchors.baseline: lowBattCombo.baseline anchors.baseline: lowBattCombo.baseline
width: _middleRowWidth width: _middleRowWidth
@ -109,8 +109,8 @@ QGCView {
FactComboBox { FactComboBox {
id: lowBattCombo id: lowBattCombo
width: _editFieldWidth width: _editFieldWidth
//model: [ qsTr("No Action"), qsTr("Return To Land") ]
fact: _lowBattAction fact: _lowBattAction
indexModel: false
} }
} }
Row { Row {
@ -166,8 +166,8 @@ QGCView {
FactComboBox { FactComboBox {
id: rcLossCombo id: rcLossCombo
width: _editFieldWidth width: _editFieldWidth
//model: [ qsTr("Loiter"), qsTr("Return To Land"), qsTr("Land at current position") ]
fact: _rcLossAction fact: _rcLossAction
indexModel: false
} }
} }
Row { Row {
@ -183,24 +183,63 @@ QGCView {
width: _editFieldWidth width: _editFieldWidth
} }
} }
/* }
This is defined in the parameter specification but it is not clear how it is used. }
The actions above (RTL, Loiter, and Land At Current Position) makes its meaning }
ambiguous. Loiter before RTL and/or Land At Current Position? What if the action /*
is set to "Loiter"? What happens after the timeout? **** Data Link Loss ****
*/
QGCLabel {
text: qsTr("Data Link Loss Trigger")
font.weight: Font.DemiBold
}
Rectangle {
color: palette.windowShade
width: rtlSettings.width
height: dlLossRow.height + _margins * 2
Row {
id: dlLossRow
spacing: _margins
anchors.verticalCenter: parent.verticalCenter
Item { width: _margins * 0.5; height: 1; }
Image {
height: ScreenTools.defaultFontPixelWidth * 6
width: ScreenTools.defaultFontPixelWidth * 20
mipmap: true
fillMode: Image.PreserveAspectFit
source: qgcPal.globalTheme === QGCPalette.Light ? "/qmlimages/DatalinkLossLight.svg" : "/qmlimages/DatalinkLoss.svg"
anchors.verticalCenter: parent.verticalCenter
}
Item { width: _margins * 0.5; height: 1; }
Column {
spacing: _margins * 0.5
anchors.verticalCenter: parent.verticalCenter
Row { Row {
QGCLabel { QGCLabel {
anchors.baseline: rcLossLoiterField.baseline anchors.baseline: dlLossCombo.baseline
width: _middleRowWidth width: _middleRowWidth
text: qsTr("RC Loss Loiter Period:") text: qsTr("Action:")
}
FactComboBox {
id: dlLossCombo
width: _editFieldWidth
fact: _dlLossAction
indexModel: false
}
}
Row {
QGCLabel {
anchors.baseline: dlLossField.baseline
width: _middleRowWidth
text: qsTr("Data Link Loss Timeout:")
} }
FactTextField { FactTextField {
id: rcLossLoiterField id: dlLossField
fact: controller.getParameterFact(-1, "NAV_RCL_LT") fact: controller.getParameterFact(-1, "COM_DL_LOSS_T")
showUnits: true showUnits: true
width: _editFieldWidth
} }
} }
*/
} }
} }
} }
@ -242,8 +281,8 @@ QGCView {
FactComboBox { FactComboBox {
id: fenceActionCombo id: fenceActionCombo
width: _editFieldWidth width: _editFieldWidth
//model: [ qsTr("None"), qsTr("Warning"), qsTr("Loiter"), qsTr("Return Home"), qsTr("Flight termination") ]
fact: _fenceAction fact: _fenceAction
indexModel: false
} }
} }
Row { Row {
@ -308,7 +347,7 @@ QGCView {
width: ScreenTools.defaultFontPixelWidth * 20 width: ScreenTools.defaultFontPixelWidth * 20
mipmap: true mipmap: true
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
source: _fixedWing ? "/qmlimages/ReturnToHomeAltitude.svg" : "/qmlimages/ReturnToHomeAltitudeCopter.svg" source: controller.fixedWing ? "/qmlimages/ReturnToHomeAltitude.svg" : "/qmlimages/ReturnToHomeAltitudeCopter.svg"
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }
Item { width: _margins * 0.5; height: 1; } Item { width: _margins * 0.5; height: 1; }
@ -422,7 +461,7 @@ QGCView {
width: ScreenTools.defaultFontPixelWidth * 20 width: ScreenTools.defaultFontPixelWidth * 20
mipmap: true mipmap: true
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
source: _fixedWing ? "/qmlimages/LandMode.svg" : "/qmlimages/LandModeCopter.svg" source: controller.fixedWing ? "/qmlimages/LandMode.svg" : "/qmlimages/LandModeCopter.svg"
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }
Item { Item {
@ -433,7 +472,7 @@ QGCView {
spacing: _margins * 0.5 spacing: _margins * 0.5
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
Row { Row {
visible: !_fixedWing visible: !controller.fixedWing
QGCLabel { QGCLabel {
anchors.baseline: landVelField.baseline anchors.baseline: landVelField.baseline
width: _middleRowWidth width: _middleRowWidth
@ -462,25 +501,6 @@ QGCView {
} }
} }
} }
/* Don't know about these
QGCLabel {
id: navRclObc
font.pixelSize: ScreenTools.mediumFontPixelSize
text: qsTr("Warning: You have an advanced safety configuration set using the NAV_RCL_OBC parameter. The above settings may not apply.")
visible: fact.value !== 0
wrapMode: Text.Wrap
property Fact fact: controller.getParameterFact(-1, "NAV_RCL_OBC")
}
QGCLabel {
id: navDllObc
font.pixelSize: ScreenTools.mediumFontPixelSize
text: qsTr("Warning: You have an advanced safety configuration set using the NAV_DLL_OBC parameter. The above settings may not apply.")
visible: fact.value !== 0
wrapMode: Text.Wrap
property Fact fact: controller.getParameterFact(-1, "NAV_DLL_OBC")
}
*/
} }
} }
} }

22
src/AutoPilotPlugins/PX4/SafetyComponentSummary.qml

@ -17,8 +17,10 @@ FactPanel {
property Fact returnAltFact: controller.getParameterFact(-1, "RTL_RETURN_ALT") property Fact returnAltFact: controller.getParameterFact(-1, "RTL_RETURN_ALT")
property Fact descendAltFact: controller.getParameterFact(-1, "RTL_DESCEND_ALT") property Fact descendAltFact: controller.getParameterFact(-1, "RTL_DESCEND_ALT")
property Fact landDelayFact: controller.getParameterFact(-1, "RTL_LAND_DELAY") property Fact landDelayFact: controller.getParameterFact(-1, "RTL_LAND_DELAY")
property Fact commDLLossFact: controller.getParameterFact(-1, "COM_DL_LOSS_EN")
property Fact commRCLossFact: controller.getParameterFact(-1, "COM_RC_LOSS_T") property Fact commRCLossFact: controller.getParameterFact(-1, "COM_RC_LOSS_T")
property Fact lowBattAction: controller.getParameterFact(-1, "COM_LOW_BAT_ACT")
property Fact rcLossAction: controller.getParameterFact(-1, "NAV_RCL_ACT")
property Fact dataLossAction: controller.getParameterFact(-1, "NAV_DLL_ACT")
Column { Column {
anchors.fill: parent anchors.fill: parent
@ -35,18 +37,24 @@ FactPanel {
} }
VehicleSummaryRow { VehicleSummaryRow {
labelText: qsTr("RTL loiter delay:") labelText: qsTr("RC loss RTL (seconds):")
valueText: landDelayFact ? (landDelayFact.value < 0 ? qsTr("Disabled") : landDelayFact.valueString) : "" valueText: commRCLossFact ? commRCLossFact.valueString : ""
} }
VehicleSummaryRow { VehicleSummaryRow {
labelText: qsTr("Telemetry loss RTL:") labelText: qsTr("RC loss action:")
valueText: commDLLossFact ? (commDLLossFact.value != -1 ? qsTr("Disabled") : commDLLossFact.valueString) : "" valueText: rcLossAction ? rcLossAction.enumStringValue : ""
} }
VehicleSummaryRow { VehicleSummaryRow {
labelText: qsTr("RC loss RTL (seconds):") labelText: qsTr("Link loss action:")
valueText: commRCLossFact ? commRCLossFact.valueString : "" valueText: dataLossAction ? dataLossAction.enumStringValue : ""
} }
VehicleSummaryRow {
labelText: qsTr("Low battery action:")
valueText: lowBattAction ? lowBattAction.enumStringValue : ""
}
} }
} }

Loading…
Cancel
Save