Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
a2c0e0d2
Commit
a2c0e0d2
authored
Jun 22, 2018
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deal with annoying missing params due to *_ENABLE settings
parent
33be72d3
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
146 additions
and
116 deletions
+146
-116
APMPowerComponent.cc
src/AutoPilotPlugins/APM/APMPowerComponent.cc
+0
-19
APMPowerComponent.h
src/AutoPilotPlugins/APM/APMPowerComponent.h
+3
-3
APMPowerComponent.qml
src/AutoPilotPlugins/APM/APMPowerComponent.qml
+87
-27
APMPowerComponentSummary.qml
src/AutoPilotPlugins/APM/APMPowerComponentSummary.qml
+15
-13
APMSafetyComponentCopter.qml
src/AutoPilotPlugins/APM/APMSafetyComponentCopter.qml
+11
-9
APMSafetyComponentSummaryCopter.qml
src/AutoPilotPlugins/APM/APMSafetyComponentSummaryCopter.qml
+30
-45
No files found.
src/AutoPilotPlugins/APM/APMPowerComponent.cc
View file @
a2c0e0d2
...
...
@@ -34,25 +34,6 @@ QString APMPowerComponent::iconResource(void) const
return
QStringLiteral
(
"/qmlimages/PowerComponentIcon.png"
);
}
bool
APMPowerComponent
::
requiresSetup
(
void
)
const
{
return
true
;
}
bool
APMPowerComponent
::
setupComplete
(
void
)
const
{
return
_vehicle
->
parameterManager
()
->
getParameter
(
FactSystem
::
defaultComponentId
,
QStringLiteral
(
"BATT_CAPACITY"
))
->
rawValue
().
toInt
()
!=
0
;
}
QStringList
APMPowerComponent
::
setupCompleteChangedTriggerList
(
void
)
const
{
QStringList
list
;
list
<<
QStringLiteral
(
"BATT_CAPACITY"
);
return
list
;
}
QUrl
APMPowerComponent
::
setupSource
(
void
)
const
{
return
QUrl
::
fromUserInput
(
QStringLiteral
(
"qrc:/qml/APMPowerComponent.qml"
));
...
...
src/AutoPilotPlugins/APM/APMPowerComponent.h
View file @
a2c0e0d2
...
...
@@ -21,14 +21,14 @@ public:
APMPowerComponent
(
Vehicle
*
vehicle
,
AutoPilotPlugin
*
autopilot
,
QObject
*
parent
=
NULL
);
// Overrides from VehicleComponent
QStringList
setupCompleteChangedTriggerList
(
void
)
const
override
;
QStringList
setupCompleteChangedTriggerList
(
void
)
const
override
{
return
QStringList
();
}
// Virtuals from VehicleComponent
QString
name
(
void
)
const
override
;
QString
description
(
void
)
const
override
;
QString
iconResource
(
void
)
const
override
;
bool
requiresSetup
(
void
)
const
override
;
bool
setupComplete
(
void
)
const
override
;
bool
requiresSetup
(
void
)
const
override
{
return
false
;
}
bool
setupComplete
(
void
)
const
override
{
return
true
;
}
QUrl
setupSource
(
void
)
const
override
;
QUrl
summaryQmlSource
(
void
)
const
override
;
bool
allowSetupWhileArmed
(
void
)
const
override
{
return
true
;
}
...
...
src/AutoPilotPlugins/APM/APMPowerComponent.qml
View file @
a2c0e0d2
...
...
@@ -36,15 +36,65 @@ SetupPage {
width
:
availableWidth
spacing
:
_margins
property
bool
_batt2ParamsAvailable
:
controller
.
parameterExists
(
-
1
,
"
BATT2_FS_LOW_ACT
"
)
property
bool
_batt2MonitorAvailable
:
controller
.
parameterExists
(
-
1
,
"
BATT2_MONITOR
"
)
property
Fact
_batt1Monitor
:
controller
.
getParameterFact
(
-
1
,
"
BATT_MONITOR
"
)
property
Fact
_batt2Monitor
:
controller
.
getParameterFact
(
-
1
,
"
BATT2_MONITOR
"
,
false
/* reportMissing */
)
property
bool
_batt2MonitorAvailable
:
controller
.
parameterExists
(
-
1
,
"
BATT2_MONITOR
"
)
property
bool
_batt1MonitorEnabled
:
_batt1Monitor
.
rawValue
!==
0
property
bool
_batt2MonitorEnabled
:
_batt2MonitorAvailable
&&
_batt2Monitor
.
rawValue
!==
0
property
bool
_batt1ParamsAvailable
:
controller
.
parameterExists
(
-
1
,
"
BATT_CAPACITY
"
)
property
bool
_batt2ParamsAvailable
:
controller
.
parameterExists
(
-
1
,
"
BATT2_CAPACITY
"
)
property
string
_restartRequired
:
qsTr
(
"
Requires vehicle reboot
"
)
QGCPalette
{
id
:
ggcPal
;
colorGroupEnabled
:
true
}
// Battery
1 settings
// Battery
1 Monitor settings only - used when only monitor param is available
Column
{
spacing
:
_margins
/
2
visible
:
!
_batt1MonitorEnabled
||
!
_batt1ParamsAvailable
QGCLabel
{
text
:
qsTr
(
"
Battery 1
"
)
font.family
:
ScreenTools
.
demiboldFontFamily
}
Rectangle
{
width
:
batt1Column
.
x
+
batt1Column
.
width
+
_margins
height
:
batt1Column
.
y
+
batt1Column
.
height
+
_margins
color
:
ggcPal
.
windowShade
ColumnLayout
{
id
:
batt1Column
anchors.margins
:
_margins
anchors.top
:
parent
.
top
anchors.left
:
parent
.
left
spacing
:
ScreenTools
.
defaultFontPixelWidth
RowLayout
{
id
:
batt1MonitorRow
spacing
:
ScreenTools
.
defaultFontPixelWidth
QGCLabel
{
text
:
qsTr
(
"
Battery1 monitor:
"
)
}
FactComboBox
{
id
:
monitor1Combo
fact
:
_batt1Monitor
indexModel
:
false
}
}
QGCLabel
{
text
:
_restartRequired
visible
:
_batt1MonitorEnabled
&&
!
_batt1ParamsAvailable
}
}
}
}
// Battery 1 settings
Column
{
id
:
_batt1FullSettings
spacing
:
_margins
/
2
visible
:
_batt1MonitorEnabled
&&
_batt1ParamsAvailable
QGCLabel
{
text
:
qsTr
(
"
Battery 1
"
)
...
...
@@ -61,25 +111,25 @@ SetupPage {
anchors.margins
:
_margins
anchors.top
:
parent
.
top
anchors.left
:
parent
.
left
sourceComponent
:
powerSetupComponent
property
Fact
armVoltMin
:
controller
.
getParameterFact
(
-
1
,
"
r.ARMING_VOLT_MIN
"
)
property
Fact
battAmpPerVolt
:
controller
.
getParameterFact
(
-
1
,
"
r.BATT_AMP_PERVLT
"
)
property
Fact
battCapacity
:
controller
.
getParameterFact
(
-
1
,
"
BATT_CAPACITY
"
)
property
Fact
battCurrPin
:
controller
.
getParameterFact
(
-
1
,
"
BATT_CURR_PIN
"
)
property
Fact
battMonitor
:
controller
.
getParameterFact
(
-
1
,
"
BATT_MONITOR
"
)
property
Fact
battVoltMult
:
controller
.
getParameterFact
(
-
1
,
"
BATT_VOLT_MULT
"
)
property
Fact
battVoltPin
:
controller
.
getParameterFact
(
-
1
,
"
BATT_VOLT_PIN
"
)
sourceComponent
:
_batt1FullSettings
.
visible
?
powerSetupComponent
:
undefined
property
Fact
armVoltMin
:
controller
.
getParameterFact
(
-
1
,
"
r.ARMING_VOLT_MIN
"
,
false
/* reportMissing */
)
property
Fact
battAmpPerVolt
:
controller
.
getParameterFact
(
-
1
,
"
r.BATT_AMP_PERVLT
"
,
false
/* reportMissing */
)
property
Fact
battCapacity
:
controller
.
getParameterFact
(
-
1
,
"
BATT_CAPACITY
"
,
false
/* reportMissing */
)
property
Fact
battCurrPin
:
controller
.
getParameterFact
(
-
1
,
"
BATT_CURR_PIN
"
,
false
/* reportMissing */
)
property
Fact
battMonitor
:
controller
.
getParameterFact
(
-
1
,
"
BATT_MONITOR
"
,
false
/* reportMissing */
)
property
Fact
battVoltMult
:
controller
.
getParameterFact
(
-
1
,
"
BATT_VOLT_MULT
"
,
false
/* reportMissing */
)
property
Fact
battVoltPin
:
controller
.
getParameterFact
(
-
1
,
"
BATT_VOLT_PIN
"
,
false
/* reportMissing */
)
property
Fact
vehicleVoltage
:
controller
.
vehicle
.
battery
.
voltage
property
Fact
vehicleCurrent
:
controller
.
vehicle
.
battery
.
current
}
}
}
// Batter2 Monitor settings only - used when only monitor param is available
// Batter
y
2 Monitor settings only - used when only monitor param is available
Column
{
spacing
:
_margins
/
2
visible
:
_batt2MonitorAvailable
&&
!
_batt2ParamsAvailable
visible
:
!
_batt2MonitorEnabled
||
!
_batt2ParamsAvailable
QGCLabel
{
text
:
qsTr
(
"
Battery 2
"
)
...
...
@@ -87,23 +137,32 @@ SetupPage {
}
Rectangle
{
width
:
batt2
MonitorRow
.
x
+
batt2MonitorRow
.
width
+
_margins
height
:
batt2
MonitorRow
.
y
+
batt2MonitorRow
.
height
+
_margins
width
:
batt2
Column
.
x
+
batt2Column
.
width
+
_margins
height
:
batt2
Column
.
y
+
batt2Column
.
height
+
_margins
color
:
ggcPal
.
windowShade
Row
Layout
{
id
:
batt2
MonitorRow
Column
Layout
{
id
:
batt2
Column
anchors.margins
:
_margins
anchors.top
:
parent
.
top
anchors.left
:
parent
.
left
spacing
:
ScreenTools
.
defaultFontPixelWidth
visible
:
_batt2MonitorAvailable
&&
!
_batt2ParamsAvailable
QGCLabel
{
text
:
qsTr
(
"
Battery2 monitor:
"
)
}
FactComboBox
{
id
:
monitorCombo
fact
:
_batt2Monitor
indexModel
:
false
RowLayout
{
id
:
batt2MonitorRow
spacing
:
ScreenTools
.
defaultFontPixelWidth
QGCLabel
{
text
:
qsTr
(
"
Battery2 monitor:
"
)
}
FactComboBox
{
id
:
monitor2Combo
fact
:
_batt2Monitor
indexModel
:
false
}
}
QGCLabel
{
text
:
_restartRequired
visible
:
_batt2MonitorEnabled
&&
!
_batt2ParamsAvailable
}
}
}
...
...
@@ -111,8 +170,9 @@ SetupPage {
// Battery 2 settings - Used when full params are available
Column
{
spacing
:
_margins
/
2
visible
:
_batt2ParamsAvailable
id
:
batt2FullSettings
spacing
:
_margins
/
2
visible
:
_batt2MonitorEnabled
&&
_batt2ParamsAvailable
QGCLabel
{
text
:
qsTr
(
"
Battery 2
"
)
...
...
@@ -129,7 +189,7 @@ SetupPage {
anchors.margins
:
_margins
anchors.top
:
parent
.
top
anchors.left
:
parent
.
left
sourceComponent
:
_batt2ParamsAvaila
ble
?
powerSetupComponent
:
undefined
sourceComponent
:
batt2FullSettings
.
visi
ble
?
powerSetupComponent
:
undefined
property
Fact
armVoltMin
:
controller
.
getParameterFact
(
-
1
,
"
r.ARMING_VOLT2_MIN
"
,
false
/* reportMissing */
)
property
Fact
battAmpPerVolt
:
controller
.
getParameterFact
(
-
1
,
"
r.BATT2_AMP_PERVLT
"
,
false
/* reportMissing */
)
...
...
src/AutoPilotPlugins/APM/APMPowerComponentSummary.qml
View file @
a2c0e0d2
...
...
@@ -7,7 +7,6 @@
*
****************************************************************************/
import
QtQuick
2.3
import
QtQuick
.
Controls
1.2
...
...
@@ -24,37 +23,40 @@ FactPanel {
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
enabled
}
FactPanelController
{
id
:
controller
;
factPanel
:
panel
}
property
Fact
_batt1Monitor
:
controller
.
getParameterFact
(
-
1
,
"
BATT_MONITOR
"
)
property
Fact
_batt2Monitor
:
controller
.
getParameterFact
(
-
1
,
"
BATT2_MONITOR
"
,
false
/* reportMissing */
)
property
bool
_batt2MonitorAvailable
:
controller
.
parameterExists
(
-
1
,
"
BATT2_MONITOR
"
)
property
bool
_batt2CapacityAvailable
:
controller
.
parameterExists
(
-
1
,
"
BATT2_CAPACITY
"
)
property
bool
_batt1MonitorEnabled
:
_batt1Monitor
.
rawValue
!==
0
property
bool
_batt2MonitorEnabled
:
_batt2MonitorAvailable
&&
_batt2Monitor
.
rawValue
!==
0
property
Fact
_battCapacity
:
controller
.
getParameterFact
(
-
1
,
"
BATT_CAPACITY
"
)
property
Fact
_battCapacity
:
controller
.
getParameterFact
(
-
1
,
"
BATT_CAPACITY
"
,
false
/* reportMissing */
)
property
Fact
_batt2Capacity
:
controller
.
getParameterFact
(
-
1
,
"
BATT2_CAPACITY
"
,
false
/* reportMissing */
)
property
Fact
_battMonitor
:
controller
.
getParameterFact
(
-
1
,
"
BATT_MONITOR
"
)
property
Fact
_batt2Monitor
:
controller
.
getParameterFact
(
-
1
,
"
BATT2_MONITOR
"
,
false
/* reportMissing */
)
property
bool
_battCapacityAvailable
:
controller
.
parameterExists
(
-
1
,
"
BATT_CAPACITY
"
)
Column
{
anchors.fill
:
parent
VehicleSummaryRow
{
labelText
:
qsTr
(
"
Batt
ery
monitor
"
)
valueText
:
_battMonitor
.
enumStringValue
labelText
:
qsTr
(
"
Batt
1
monitor
"
)
valueText
:
_batt
1
Monitor
.
enumStringValue
}
VehicleSummaryRow
{
labelText
:
qsTr
(
"
Battery capacity
"
)
valueText
:
_battCapacity
.
valueString
+
"
"
+
_battCapacity
.
units
labelText
:
qsTr
(
"
Batt1 capacity
"
)
valueText
:
_batt1MonitorEnabled
?
_battCapacity
.
valueString
+
"
"
+
_battCapacity
.
units
:
""
visible
:
_batt1MonitorEnabled
}
VehicleSummaryRow
{
labelText
:
qsTr
(
"
Batt
ery
2 monitor
"
)
labelText
:
qsTr
(
"
Batt2 monitor
"
)
valueText
:
_batt2MonitorAvailable
?
_batt2Monitor
.
enumStringValue
:
""
visible
:
_batt2MonitorAvailable
}
VehicleSummaryRow
{
labelText
:
qsTr
(
"
Batt
ery
2 capacity
"
)
valueText
:
_batt2
CapacityAvailable
?
_batt2Capacity
.
valueString
+
"
"
+
_batt
Capacity
.
units
:
""
visible
:
_batt2
CapacityAvailable
labelText
:
qsTr
(
"
Batt2 capacity
"
)
valueText
:
_batt2
MonitorEnabled
?
_batt2Capacity
.
valueString
+
"
"
+
_batt2
Capacity
.
units
:
""
visible
:
_batt2
MonitorEnabled
}
}
}
src/AutoPilotPlugins/APM/APMSafetyComponentCopter.qml
View file @
a2c0e0d2
...
...
@@ -36,20 +36,21 @@ SetupPage {
QGCPalette
{
id
:
ggcPal
;
colorGroupEnabled
:
true
}
property
Fact
_failsafeGCSEnable
:
controller
.
getParameterFact
(
-
1
,
"
FS_GCS_ENABLE
"
)
property
Fact
_failsafeBattLowAct
:
controller
.
getParameterFact
(
-
1
,
"
r.BATT_FS_LOW_ACT
"
)
property
Fact
_failsafeBattMah
:
controller
.
getParameterFact
(
-
1
,
"
r.BATT_LOW_MAH
"
)
property
Fact
_failsafeBattVoltage
:
controller
.
getParameterFact
(
-
1
,
"
r.BATT_LOW_VOLT
"
)
property
Fact
_failsafeBattLowAct
:
controller
.
getParameterFact
(
-
1
,
"
r.BATT_FS_LOW_ACT
"
,
false
/* reportMissing */
)
property
Fact
_failsafeBattMah
:
controller
.
getParameterFact
(
-
1
,
"
r.BATT_LOW_MAH
"
,
false
/* reportMissing */
)
property
Fact
_failsafeBattVoltage
:
controller
.
getParameterFact
(
-
1
,
"
r.BATT_LOW_VOLT
"
,
false
/* reportMissing */
)
property
Fact
_failsafeThrEnable
:
controller
.
getParameterFact
(
-
1
,
"
FS_THR_ENABLE
"
)
property
Fact
_failsafeThrValue
:
controller
.
getParameterFact
(
-
1
,
"
FS_THR_VALUE
"
)
property
bool
_failsafeBattCritActAvailable
:
controller
.
parameterExists
(
-
1
,
"
BATT_FS_CRT_ACT
"
)
property
bool
_failsafeBatt2LowActAvailable
:
controller
.
parameterExists
(
-
1
,
"
BATT2_FS_LOW_ACT
"
)
property
bool
_failsafeBatt2CritActAvailable
:
controller
.
parameterExists
(
-
1
,
"
BATT2_FS_CRT_ACT
"
)
property
Fact
_batt1Monitor
:
controller
.
getParameterFact
(
-
1
,
"
BATT_MONITOR
"
)
property
Fact
_batt2Monitor
:
controller
.
getParameterFact
(
-
1
,
"
BATT2_MONITOR
"
,
false
/* reportMissing */
)
property
bool
_batt2MonitorAvailable
:
controller
.
parameterExists
(
-
1
,
"
BATT2_MONITOR
"
)
property
bool
_batt1MonitorEnabled
:
_batt2MonitorAvailable
?
_batt2Monitor
.
rawValue
!==
0
:
false
property
bool
_batt2MonitorEnabled
:
_batt2MonitorAvailable
?
_batt2Monitor
.
rawValue
!==
0
:
false
property
bool
_batt1ParamsAvailable
:
controller
.
parameterExists
(
-
1
,
"
BATT_CAPACITY
"
)
property
bool
_batt2ParamsAvailable
:
controller
.
parameterExists
(
-
1
,
"
BATT2_CAPACITY
"
)
property
Fact
_failsafeBattCritAct
:
controller
.
getParameterFact
(
-
1
,
"
BATT_FS_CRT_ACT
"
,
false
/* reportMissing */
)
property
Fact
_batt2Monitor
:
controller
.
getParameterFact
(
-
1
,
"
BATT2_MONITOR
"
,
false
/* reportMissing */
)
property
Fact
_failsafeBatt2LowAct
:
controller
.
getParameterFact
(
-
1
,
"
BATT2_FS_LOW_ACT
"
,
false
/* reportMissing */
)
property
Fact
_failsafeBatt2CritAct
:
controller
.
getParameterFact
(
-
1
,
"
BATT2_FS_CRT_ACT
"
,
false
/* reportMissing */
)
property
Fact
_failsafeBatt2Mah
:
controller
.
getParameterFact
(
-
1
,
"
BATT2_LOW_MAH
"
,
false
/* reportMissing */
)
...
...
@@ -78,9 +79,10 @@ SetupPage {
Column
{
spacing
:
_margins
/
2
visible
:
_batt1MonitorEnabled
&&
_batt1ParamsAvailable
QGCLabel
{
text
:
qsTr
(
"
Battery Failsafe Triggers
"
)
text
:
qsTr
(
"
Battery
1
Failsafe Triggers
"
)
font.family
:
ScreenTools
.
demiboldFontFamily
}
...
...
@@ -147,7 +149,7 @@ SetupPage {
Column
{
spacing
:
_margins
/
2
visible
:
_batt2MonitorEnabled
&&
_
failsafeBatt2LowAct
Available
visible
:
_batt2MonitorEnabled
&&
_
batt2Params
Available
QGCLabel
{
text
:
qsTr
(
"
Battery2 Failsafe Triggers
"
)
...
...
src/AutoPilotPlugins/APM/APMSafetyComponentSummaryCopter.qml
View file @
a2c0e0d2
...
...
@@ -14,63 +14,63 @@ FactPanel {
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
enabled
}
FactPanelController
{
id
:
controller
;
factPanel
:
panel
}
property
Fact
_failsafeBattLowAct
:
controller
.
getParameterFact
(
-
1
,
"
r.BATT_FS_LOW_ACT
"
)
property
Fact
_failsafeThrEnable
:
controller
.
getParameterFact
(
-
1
,
"
FS_THR_ENABLE
"
)
property
Fact
_failsafeThrEnable
:
controller
.
getParameterFact
(
-
1
,
"
FS_THR_ENABLE
"
)
property
Fact
_fenceAction
:
controller
.
getParameterFact
(
-
1
,
"
FENCE_ACTION
"
)
property
Fact
_fenceEnable
:
controller
.
getParameterFact
(
-
1
,
"
FENCE_ENABLE
"
)
property
Fact
_fenceType
:
controller
.
getParameterFact
(
-
1
,
"
FENCE_TYPE
"
)
property
Fact
_fenceAction
:
controller
.
getParameterFact
(
-
1
,
"
FENCE_ACTION
"
)
property
Fact
_fenceEnable
:
controller
.
getParameterFact
(
-
1
,
"
FENCE_ENABLE
"
)
property
Fact
_fenceType
:
controller
.
getParameterFact
(
-
1
,
"
FENCE_TYPE
"
)
property
Fact
_rtlAltFact
:
controller
.
getParameterFact
(
-
1
,
"
RTL_ALT
"
)
property
Fact
_rtlLoitTimeFact
:
controller
.
getParameterFact
(
-
1
,
"
RTL_LOIT_TIME
"
)
property
Fact
_rtlAltFinalFact
:
controller
.
getParameterFact
(
-
1
,
"
RTL_ALT_FINAL
"
)
property
Fact
_landSpeedFact
:
controller
.
getParameterFact
(
-
1
,
"
LAND_SPEED
"
)
property
Fact
_rtlAltFact
:
controller
.
getParameterFact
(
-
1
,
"
RTL_ALT
"
)
property
Fact
_armingCheck
:
controller
.
getParameterFact
(
-
1
,
"
ARMING_CHECK
"
)
property
Fact
_armingCheck
:
controller
.
getParameterFact
(
-
1
,
"
ARMING_CHECK
"
)
property
bool
_failsafeBattCritActAvailable
:
controller
.
parameterExists
(
-
1
,
"
BATT_FS_CRT_ACT
"
)
property
bool
_failsafeBatt2LowActAvailable
:
controller
.
parameterExists
(
-
1
,
"
BATT2_FS_LOW_ACT
"
)
property
bool
_failsafeBatt2CritActAvailable
:
controller
.
parameterExists
(
-
1
,
"
BATT2_FS_CRT_ACT
"
)
property
Fact
_batt1Monitor
:
controller
.
getParameterFact
(
-
1
,
"
BATT_MONITOR
"
)
property
Fact
_batt2Monitor
:
controller
.
getParameterFact
(
-
1
,
"
BATT2_MONITOR
"
,
false
/* reportMissing */
)
property
bool
_batt2MonitorAvailable
:
controller
.
parameterExists
(
-
1
,
"
BATT2_MONITOR
"
)
property
bool
_batt1MonitorEnabled
:
_batt1Monitor
.
rawValue
!==
0
property
bool
_batt2MonitorEnabled
:
_batt2MonitorAvailable
&&
_batt2Monitor
.
rawValue
!==
0
property
Fact
_failsafeBattCritAct
:
controller
.
getParameterFact
(
-
1
,
"
BATT_FS_CRT_ACT
"
,
false
/* reportMissing */
)
property
Fact
_batt2Monitor
:
controller
.
getParameterFact
(
-
1
,
"
BATT2_MONITOR
"
,
false
/* reportMissing */
)
property
Fact
_failsafeBatt2LowAct
:
controller
.
getParameterFact
(
-
1
,
"
BATT2_FS_LOW_ACT
"
,
false
/* reportMissing */
)
property
Fact
_failsafeBatt2CritAct
:
controller
.
getParameterFact
(
-
1
,
"
BATT2_FS_CRT_ACT
"
,
false
/* reportMissing */
)
property
Fact
_batt1FSLowAct
:
controller
.
getParameterFact
(
-
1
,
"
r.BATT_FS_LOW_ACT
"
,
false
/* reportMissing */
)
property
Fact
_batt1FSCritAct
:
controller
.
getParameterFact
(
-
1
,
"
BATT_FS_CRT_ACT
"
,
false
/* reportMissing */
)
property
Fact
_batt2FSLowAct
:
controller
.
getParameterFact
(
-
1
,
"
BATT2_FS_LOW_ACT
"
,
false
/* reportMissing */
)
property
Fact
_batt2FSCritAct
:
controller
.
getParameterFact
(
-
1
,
"
BATT2_FS_CRT_ACT
"
,
false
/* reportMissing */
)
property
bool
_batt1FSCritActAvailable
:
controller
.
parameterExists
(
-
1
,
"
BATT_FS_CRT_ACT
"
)
Column
{
anchors.fill
:
parent
VehicleSummaryRow
{
labelText
:
qsTr
(
"
Arming Checks:
"
)
valueText
:
_armingCheck
.
value
&
1
?
qsTr
(
"
Enabled
"
)
:
qsTr
(
"
Some disabled
"
)
valueText
:
_armingCheck
.
value
&
1
?
qsTr
(
"
Enabled
"
)
:
qsTr
(
"
Some disabled
"
)
}
VehicleSummaryRow
{
labelText
:
qsTr
(
"
Throttle failsafe:
"
)
valueText
:
_failsafeBattLowAct
.
enumStringValue
valueText
:
_failsafeThrEnable
.
enumStringValue
}
VehicleSummaryRow
{
labelText
:
qsTr
(
"
Batt low failsafe:
"
)
valueText
:
_failsafeBattLowAct
.
enumStringValue
labelText
:
qsTr
(
"
Batt1 low failsafe:
"
)
valueText
:
_batt1MonitorEnabled
?
_batt1FSLowAct
.
enumStringValue
:
""
visible
:
_batt1MonitorEnabled
}
VehicleSummaryRow
{
labelText
:
qsTr
(
"
Batt critical failsafe:
"
)
valueText
:
_
failsafeBattCritActAvailable
?
_failsafeBatt
CritAct
.
enumStringValue
:
""
visible
:
_
failsafeBatt
CritActAvailable
labelText
:
qsTr
(
"
Batt
1
critical failsafe:
"
)
valueText
:
_
batt1FSCritActAvailable
?
_batt1FS
CritAct
.
enumStringValue
:
""
visible
:
_
batt1FS
CritActAvailable
}
VehicleSummaryRow
{
labelText
:
qsTr
(
"
Batt2 low failsafe:
"
)
valueText
:
_
failsafeBatt2LowActAvailable
?
_failsafeBatt2
LowAct
.
enumStringValue
:
""
visible
:
_
failsafeBatt2LowActAvailable
labelText
:
qsTr
(
"
Batt2 low failsafe:
"
)
valueText
:
_
batt2MonitorEnabled
?
_batt2FS
LowAct
.
enumStringValue
:
""
visible
:
_
batt2MonitorEnabled
}
VehicleSummaryRow
{
labelText
:
qsTr
(
"
Batt2 critical failsafe:
"
)
valueText
:
_
failsafeBatt2CritActAvailable
?
_failsafeBatt2
CritAct
.
enumStringValue
:
""
visible
:
_
failsafeBatt2CritActAvailable
labelText
:
qsTr
(
"
Batt2 critical failsafe:
"
)
valueText
:
_
batt2MonitorEnabled
?
_batt2FS
CritAct
.
enumStringValue
:
""
visible
:
_
batt2MonitorEnabled
}
VehicleSummaryRow
{
...
...
@@ -94,20 +94,5 @@ FactPanel {
labelText
:
qsTr
(
"
RTL min alt:
"
)
valueText
:
_rtlAltFact
.
value
==
0
?
qsTr
(
"
current
"
)
:
_rtlAltFact
.
valueString
+
"
"
+
_rtlAltFact
.
units
}
VehicleSummaryRow
{
labelText
:
qsTr
(
"
RTL loiter time:
"
)
valueText
:
_rtlLoitTimeFact
.
valueString
+
"
"
+
_rtlLoitTimeFact
.
units
}
VehicleSummaryRow
{
labelText
:
qsTr
(
"
RTL final alt:
"
)
valueText
:
_rtlAltFinalFact
.
value
==
0
?
qsTr
(
"
Land
"
)
:
_rtlAltFinalFact
.
valueString
+
"
"
+
_rtlAltFinalFact
.
units
}
VehicleSummaryRow
{
labelText
:
qsTr
(
"
Descent speed:
"
)
valueText
:
_landSpeedFact
.
valueString
+
"
"
+
_landSpeedFact
.
units
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment