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
4e8d599d
Commit
4e8d599d
authored
Feb 19, 2020
by
Jacob Dahl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed interactions between PreFlightCheckList and the FlightView
parent
bd4bfe55
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
16 deletions
+55
-16
FlightDisplayView.qml
src/FlightDisplay/FlightDisplayView.qml
+37
-4
GuidedActionsController.qml
src/FlightDisplay/GuidedActionsController.qml
+7
-3
PreFlightCheckList.qml
src/FlightDisplay/PreFlightCheckList.qml
+11
-9
No files found.
src/FlightDisplay/FlightDisplayView.qml
View file @
4e8d599d
...
...
@@ -50,7 +50,7 @@ Item {
property
bool
_isPipVisible
:
QGroundControl
.
videoManager
.
hasVideo
?
QGroundControl
.
loadBoolGlobalSetting
(
_PIPVisibleKey
,
true
)
:
false
property
bool
_useChecklist
:
QGroundControl
.
settingsManager
.
appSettings
.
useChecklist
.
rawValue
&&
QGroundControl
.
corePlugin
.
options
.
preFlightChecklistUrl
.
toString
().
length
property
bool
_enforceChecklist
:
_useChecklist
&&
QGroundControl
.
settingsManager
.
appSettings
.
enforceChecklist
.
rawValue
property
bool
_c
anArm
:
activeVehicle
?
(
_useChecklist
?
(
_enforceChecklist
?
activeVehicle
.
checkListState
===
Vehicle
.
CheckListPassed
:
true
)
:
true
)
:
false
property
bool
_c
hecklistComplete
:
activeVehicle
&&
(
activeVehicle
.
checkListState
===
Vehicle
.
CheckListPassed
)
property
real
_margins
:
ScreenTools
.
defaultFontPixelWidth
/
2
property
real
_pipSize
:
mainWindow
.
width
*
0.2
property
alias
_guidedController
:
guidedActionsController
...
...
@@ -70,6 +70,26 @@ Item {
readonly
property
string
_mainIsMapKey
:
"
MainFlyWindowIsMap
"
readonly
property
string
_PIPVisibleKey
:
"
IsPIPVisible
"
onVisibleChanged
:
{
if
(
activeVehicle
&&
!
_checklistComplete
&&
_enforceChecklist
)
{
checklistPopupTimer
.
restart
()
}
}
Timer
{
id
:
checklistPopupTimer
interval
:
1000
repeat
:
false
onTriggered
:
{
if
(
visible
&&
!
_checklistComplete
)
{
checklistDropPanel
.
open
()
}
else
{
checklistDropPanel
.
close
()
}
}
}
function
setStates
()
{
QGroundControl
.
saveBoolGlobalSetting
(
_mainIsMapKey
,
mainIsMap
)
if
(
mainIsMap
)
{
...
...
@@ -597,7 +617,7 @@ Item {
name
:
_guidedController
.
takeoffTitle
,
iconSource
:
"
/res/takeoff.svg
"
,
buttonVisible
:
_guidedController
.
showTakeoff
||
!
_guidedController
.
showLand
,
buttonEnabled
:
_guidedController
.
showTakeoff
&&
_canArm
,
buttonEnabled
:
_guidedController
.
showTakeoff
,
action
:
_guidedController
.
actionTakeoff
},
{
...
...
@@ -625,7 +645,7 @@ Item {
name
:
qsTr
(
"
Action
"
),
iconSource
:
"
/res/action.svg
"
,
buttonVisible
:
!
_guidedController
.
showPause
,
buttonEnabled
:
_anyActionAvailable
&&
_canArm
,
buttonEnabled
:
_anyActionAvailable
,
action
:
-
1
}
]
...
...
@@ -659,7 +679,7 @@ Item {
z
:
_flightVideoPipControl
.
z
+
1
onShowStartMissionChanged
:
{
if
(
showStartMission
&&
_canArm
)
{
if
(
showStartMission
)
{
confirmAction
(
actionStartMission
)
}
}
...
...
@@ -778,10 +798,23 @@ Item {
color
:
Qt
.
rgba
(
0
,
0
,
0
,
0
)
clip
:
true
}
Loader
{
id
:
checkList
anchors.centerIn
:
parent
}
property
alias
checkListItem
:
checkList
.
item
Connections
{
target
:
checkList
.
item
onAllChecksPassedChanged
:
{
if
(
target
.
allChecksPassed
)
{
checklistPopupTimer
.
restart
()
}
}
}
}
}
src/FlightDisplay/GuidedActionsController.qml
View file @
4e8d599d
...
...
@@ -96,13 +96,17 @@ Item {
readonly
property
int
actionVtolTransitionToMRFlight
:
21
readonly
property
int
actionROI
:
22
property
bool
_useChecklist
:
QGroundControl
.
settingsManager
.
appSettings
.
useChecklist
.
rawValue
&&
QGroundControl
.
corePlugin
.
options
.
preFlightChecklistUrl
.
toString
().
length
property
bool
_enforceChecklist
:
_useChecklist
&&
QGroundControl
.
settingsManager
.
appSettings
.
enforceChecklist
.
rawValue
property
bool
_canArm
:
activeVehicle
?
(
_useChecklist
?
(
_enforceChecklist
?
activeVehicle
.
checkListState
===
Vehicle
.
CheckListPassed
:
true
)
:
true
)
:
false
property
bool
showEmergenyStop
:
_guidedActionsEnabled
&&
!
_hideEmergenyStop
&&
_vehicleArmed
&&
_vehicleFlying
property
bool
showArm
:
_guidedActionsEnabled
&&
!
_vehicleArmed
property
bool
showArm
:
_guidedActionsEnabled
&&
!
_vehicleArmed
&&
_canArm
property
bool
showDisarm
:
_guidedActionsEnabled
&&
_vehicleArmed
&&
!
_vehicleFlying
property
bool
showRTL
:
_guidedActionsEnabled
&&
_vehicleArmed
&&
activeVehicle
.
guidedModeSupported
&&
_vehicleFlying
&&
!
_vehicleInRTLMode
property
bool
showTakeoff
:
_guidedActionsEnabled
&&
activeVehicle
.
takeoffVehicleSupported
&&
!
_vehicleFlying
property
bool
showTakeoff
:
_guidedActionsEnabled
&&
activeVehicle
.
takeoffVehicleSupported
&&
!
_vehicleFlying
&&
_canArm
property
bool
showLand
:
_guidedActionsEnabled
&&
activeVehicle
.
guidedModeSupported
&&
_vehicleArmed
&&
!
activeVehicle
.
fixedWing
&&
!
_vehicleInLandMode
property
bool
showStartMission
:
_guidedActionsEnabled
&&
_missionAvailable
&&
!
_missionActive
&&
!
_vehicleFlying
property
bool
showStartMission
:
_guidedActionsEnabled
&&
_missionAvailable
&&
!
_missionActive
&&
!
_vehicleFlying
&&
_canArm
property
bool
showContinueMission
:
_guidedActionsEnabled
&&
_missionAvailable
&&
!
_missionActive
&&
_vehicleArmed
&&
_vehicleFlying
&&
(
_currentMissionIndex
<
_missionItemCount
-
1
)
property
bool
showPause
:
_guidedActionsEnabled
&&
_vehicleArmed
&&
activeVehicle
.
pauseVehicleSupported
&&
_vehicleFlying
&&
!
_vehiclePaused
&&
!
_fixedWingOnApproach
property
bool
showChangeAlt
:
_guidedActionsEnabled
&&
_vehicleFlying
&&
activeVehicle
.
guidedModeSupported
&&
_vehicleArmed
&&
!
_missionActive
...
...
src/FlightDisplay/PreFlightCheckList.qml
View file @
4e8d599d
...
...
@@ -30,7 +30,15 @@ Rectangle {
source
:
"
/checklists/DefaultChecklist.qml
"
}
property
bool
_passed
:
false
property
bool
allChecksPassed
:
false
onAllChecksPassedChanged
:
{
if
(
allChecksPassed
)
{
activeVehicle
.
checkListState
=
Vehicle
.
CheckListPassed
}
else
{
activeVehicle
.
checkListState
=
Vehicle
.
CheckListFailed
}
}
function
_handleGroupPassedChanged
(
index
,
passed
)
{
if
(
passed
)
{
...
...
@@ -53,7 +61,7 @@ Rectangle {
break
}
}
_p
assed
=
allPassed
;
allChecksP
assed
=
allPassed
;
}
//-- Pick a checklist model that matches the current airframe type (if any)
...
...
@@ -85,12 +93,6 @@ Rectangle {
if
(
activeVehicle
)
{
if
(
visible
)
{
_updateModel
()
}
else
{
if
(
modelContainer
.
item
.
model
.
isPassed
())
{
activeVehicle
.
checkListState
=
Vehicle
.
CheckListPassed
}
else
{
activeVehicle
.
checkListState
=
Vehicle
.
CheckListFailed
}
}
}
}
...
...
@@ -139,7 +141,7 @@ Rectangle {
height
:
1.75
*
ScreenTools
.
defaultFontPixelHeight
QGCLabel
{
text
:
qsTr
(
"
Pre-Flight Checklist %1
"
).
arg
(
_p
assed
?
qsTr
(
"
(passed)
"
)
:
""
)
text
:
qsTr
(
"
Pre-Flight Checklist %1
"
).
arg
(
allChecksP
assed
?
qsTr
(
"
(passed)
"
)
:
""
)
anchors.left
:
parent
.
left
anchors.verticalCenter
:
parent
.
verticalCenter
font.pointSize
:
ScreenTools
.
mediumFontPointSize
...
...
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