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
b9c5d2ed
Commit
b9c5d2ed
authored
May 24, 2018
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Style cleanup and changes
* Added support for sat count to Sensors check control
parent
4ee40f9f
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
57 additions
and
43 deletions
+57
-43
FlightDisplayView.qml
src/FlightDisplay/FlightDisplayView.qml
+2
-2
PreFlightBatteryCheck.qml
src/FlightDisplay/PreFlightBatteryCheck.qml
+3
-3
PreFlightCheckList.qml
src/FlightDisplay/PreFlightCheckList.qml
+9
-9
PreFlightRCCheck.qml
src/FlightDisplay/PreFlightRCCheck.qml
+2
-2
PreFlightSensorsCheck.qml
src/FlightDisplay/PreFlightSensorsCheck.qml
+23
-14
PreFlightSoundCheck.qml
src/FlightDisplay/PreFlightSoundCheck.qml
+2
-2
DropPanel.qml
src/QmlControls/DropPanel.qml
+5
-0
PreFlightCheckButton.qml
src/QmlControls/PreFlightCheckButton.qml
+11
-11
No files found.
src/FlightDisplay/FlightDisplayView.qml
View file @
b9c5d2ed
...
...
@@ -716,7 +716,7 @@ QGCView {
height
:
1.75
*
ScreenTools
.
defaultFontPixelHeight
QGCLabel
{
text
:
_activeVehicle
?
qsTr
(
"
Pre-
flight checklist
"
)
+
"
(MAV ID:
"
+
_activeVehicle
.
id
+
"
)
"
:
qsTr
(
"
Pre-flight checklist (no vehicle)
"
)
text
:
_activeVehicle
?
qsTr
(
"
Pre-
Flight Checklist
"
)
:
qsTr
(
"
Pre-flight checklist (no vehicle)
"
)
anchors.left
:
parent
.
left
anchors.verticalCenter
:
parent
.
verticalCenter
font.pointSize
:
ScreenTools
.
mediumFontPointSize
...
...
@@ -727,7 +727,7 @@ QGCView {
anchors.right
:
parent
.
right
anchors.verticalCenter
:
parent
.
verticalCenter
opacity
:
0.2
+
0.8
*
(
QGroundControl
.
multiVehicleManager
.
vehicles
.
count
>
0
)
tooltip
:
"
Reset the checklist (e.g. after a vehicle reboot)
"
tooltip
:
qsTr
(
"
Reset the checklist (e.g. after a vehicle reboot)
"
)
onClicked
:
preFlightCheckList
.
resetNrClicks
()
...
...
src/FlightDisplay/PreFlightBatteryCheck.qml
View file @
b9c5d2ed
...
...
@@ -16,7 +16,7 @@ import QGroundControl.Vehicle 1.0
// This class stores the data and functions of the check list but NOT the GUI (which is handled somewhere else).
PreFlightCheckButton
{
name
:
qsTr
(
"
Battery
"
)
pending
t
ext
:
qsTr
(
"
Healthy & charged > %1. Battery connector firmly plugged?
"
).
arg
(
failureVoltage
)
pending
T
ext
:
qsTr
(
"
Healthy & charged > %1. Battery connector firmly plugged?
"
).
arg
(
failureVoltage
)
property
int
failureVoltage
:
40
...
...
@@ -35,10 +35,10 @@ PreFlightCheckButton {
state
=
stateNotChecked
}
else
{
if
(
_unhealthySensors
&
Vehicle
.
SysStatusSensorBattery
)
{
failure
t
ext
=
qsTr
(
"
Not healthy. Check console.
"
)
failure
T
ext
=
qsTr
(
"
Not healthy. Check console.
"
)
state
=
stateMajorIssue
}
else
if
(
_batPercentRemaining
<
failureVoltage
)
{
failure
t
ext
=
qsTr
(
"
Low (below %1). Please recharge.
"
).
arg
(
failureVoltage
)
failure
T
ext
=
qsTr
(
"
Low (below %1). Please recharge.
"
).
arg
(
failureVoltage
)
state
=
stateMajorIssue
}
else
{
state
=
_nrClicked
>
0
?
statePassed
:
statePending
...
...
src/FlightDisplay/PreFlightCheckList.qml
View file @
b9c5d2ed
...
...
@@ -45,7 +45,7 @@ Item {
PreFlightCheckButton
{
id
:
buttonHardware
name
:
"
Hardware
"
default
t
ext
:
"
Props mounted? Wings secured? Tail secured?
"
default
T
ext
:
"
Props mounted? Wings secured? Tail secured?
"
}
PreFlightBatteryCheck
{
id
:
buttonBattery
...
...
@@ -67,19 +67,19 @@ Item {
id
:
buttonActuators
name
:
"
Actuators
"
group
:
1
default
t
ext
:
"
Move all control surfaces. Did they work properly?
"
default
T
ext
:
"
Move all control surfaces. Did they work properly?
"
}
PreFlightCheckButton
{
id
:
buttonMotors
name
:
"
Motors
"
group
:
1
default
t
ext
:
"
Propellers free? Then throttle up gently. Working properly?
"
default
T
ext
:
"
Propellers free? Then throttle up gently. Working properly?
"
}
PreFlightCheckButton
{
id
:
buttonMission
name
:
"
Mission
"
group
:
1
default
t
ext
:
"
Please confirm mission is valid (waypoints valid, no terrain collision).
"
default
T
ext
:
"
Please confirm mission is valid (waypoints valid, no terrain collision).
"
}
PreFlightSoundCheck
{
id
:
buttonSoundOutput
...
...
@@ -92,21 +92,21 @@ Item {
id
:
buttonPayload
name
:
"
Payload
"
group
:
2
default
t
ext
:
"
Configured and started?
"
pending
t
ext
:
"
Payload lid closed?
"
default
T
ext
:
"
Configured and started?
"
pending
T
ext
:
"
Payload lid closed?
"
}
PreFlightCheckButton
{
id
:
buttonWeather
name
:
"
Wind & weather
"
group
:
2
default
t
ext
:
"
OK for your platform?
"
pending
t
ext
:
"
Launching into the wind?
"
default
T
ext
:
"
OK for your platform?
"
pending
T
ext
:
"
Launching into the wind?
"
}
PreFlightCheckButton
{
id
:
buttonFlightAreaFree
name
:
"
Flight area
"
group
:
2
default
t
ext
:
"
Launch area and path free of obstacles/people?
"
default
T
ext
:
"
Launch area and path free of obstacles/people?
"
}
}
// Object Model
}
src/FlightDisplay/PreFlightRCCheck.qml
View file @
b9c5d2ed
...
...
@@ -15,8 +15,8 @@ import QGroundControl.Vehicle 1.0
PreFlightCheckButton
{
name
:
qsTr
(
"
Radio Control
"
)
pending
t
ext
:
qsTr
(
"
Receiving signal. Perform range test & confirm.
"
)
failure
t
ext
:
qsTr
(
"
No signal or invalid autopilot-RC config. Check RC and console.
"
)
pending
T
ext
:
qsTr
(
"
Receiving signal. Perform range test & confirm.
"
)
failure
T
ext
:
qsTr
(
"
No signal or invalid autopilot-RC config. Check RC and console.
"
)
property
int
_unhealthySensors
:
_activeVehicle
?
_activeVehicle
.
sensorsUnhealthyBits
:
0
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
...
...
src/FlightDisplay/PreFlightSensorsCheck.qml
View file @
b9c5d2ed
...
...
@@ -16,11 +16,22 @@ import QGroundControl.Vehicle 1.0
PreFlightCheckButton
{
name
:
qsTr
(
"
Sensors
"
)
property
int
failureSatCount
:
-
1
///< -1 indicates no sat count check
property
int
_unhealthySensors
:
_activeVehicle
?
_activeVehicle
.
sensorsUnhealthyBits
:
0
property
bool
_gpsLock
:
_activeVehicle
?
_activeVehicle
.
gps
.
lock
.
rawValue
>=
3
:
0
property
bool
_gpsLock
:
_activeVehicle
?
_activeVehicle
.
gps
.
lock
.
rawValue
>=
3
:
0
property
bool
_satCount
:
_activeVehicle
?
_activeVehicle
.
gps
.
count
:
0
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
property
int
_allCheckedSensors
:
Vehicle
.
SysStatusSensor3dMag
|
Vehicle
.
SysStatusSensor3dAccel
|
Vehicle
.
SysStatusSensor3dGyro
|
Vehicle
.
SysStatusSensorAbsolutePressure
|
Vehicle
.
SysStatusSensorDifferentialPressure
|
Vehicle
.
SysStatusSensorGPS
on_GpsLockChanged
:
updateItem
()
on_SatCountChanged
:
updateItem
()
on_UnhealthySensorsChanged
:
updateItem
()
on_ActiveVehicleChanged
:
updateItem
()
...
...
@@ -30,25 +41,23 @@ PreFlightCheckButton {
if
(
!
_activeVehicle
)
{
state
=
stateNotChecked
}
else
{
if
(
!
(
_unhealthySensors
&
Vehicle
.
SysStatusSensor3dMag
)
&&
!
(
_unhealthySensors
&
Vehicle
.
SysStatusSensor3dAccel
)
&&
!
(
_unhealthySensors
&
Vehicle
.
SysStatusSensor3dGyro
)
&&
!
(
_unhealthySensors
&
Vehicle
.
SysStatusSensorAbsolutePressure
)
&&
!
(
_unhealthySensors
&
Vehicle
.
SysStatusSensorDifferentialPressure
)
&&
!
(
_unhealthySensors
&
Vehicle
.
SysStatusSensorGPS
))
{
if
(
!
(
_unhealthySensors
&
_allCheckedSensors
))
{
if
(
!
_gpsLock
)
{
pendingtext
=
qsTr
(
"
Pending. Waiting for GPS lock.
"
)
pendingText
=
qsTr
(
"
Pending. Waiting for GPS lock.
"
)
state
=
statePending
}
else
if
(
failureSatCount
!==
-
1
&&
_satCount
<=
failureSatCount
)
{
pendingText
=
qsTr
(
"
Pending. Waiting for Sat Count > %1.
"
).
arg
(
failureSatCount
)
state
=
statePending
}
else
{
state
=
statePassed
}
}
else
{
if
(
_unhealthySensors
&
Vehicle
.
SysStatusSensor3dMag
)
failure
t
ext
=
qsTr
(
"
Failure. Magnetometer issues. Check console.
"
)
else
if
(
_unhealthySensors
&
Vehicle
.
SysStatusSensor3dAccel
)
failure
t
ext
=
qsTr
(
"
Failure. Accelerometer issues. Check console.
"
)
else
if
(
_unhealthySensors
&
Vehicle
.
SysStatusSensor3dGyro
)
failure
t
ext
=
qsTr
(
"
Failure. Gyroscope issues. Check console.
"
)
else
if
(
_unhealthySensors
&
Vehicle
.
SysStatusSensorAbsolutePressure
)
failure
t
ext
=
qsTr
(
"
Failure. Barometer issues. Check console.
"
)
else
if
(
_unhealthySensors
&
Vehicle
.
SysStatusSensorDifferentialPressure
)
failure
t
ext
=
qsTr
(
"
Failure. Airspeed sensor issues. Check console.
"
)
else
if
(
_unhealthySensors
&
Vehicle
.
SysStatusSensorGPS
)
failure
t
ext
=
qsTr
(
"
Failure. No valid or low quality GPS signal. Check console.
"
)
if
(
_unhealthySensors
&
Vehicle
.
SysStatusSensor3dMag
)
failure
T
ext
=
qsTr
(
"
Failure. Magnetometer issues. Check console.
"
)
else
if
(
_unhealthySensors
&
Vehicle
.
SysStatusSensor3dAccel
)
failure
T
ext
=
qsTr
(
"
Failure. Accelerometer issues. Check console.
"
)
else
if
(
_unhealthySensors
&
Vehicle
.
SysStatusSensor3dGyro
)
failure
T
ext
=
qsTr
(
"
Failure. Gyroscope issues. Check console.
"
)
else
if
(
_unhealthySensors
&
Vehicle
.
SysStatusSensorAbsolutePressure
)
failure
T
ext
=
qsTr
(
"
Failure. Barometer issues. Check console.
"
)
else
if
(
_unhealthySensors
&
Vehicle
.
SysStatusSensorDifferentialPressure
)
failure
T
ext
=
qsTr
(
"
Failure. Airspeed sensor issues. Check console.
"
)
else
if
(
_unhealthySensors
&
Vehicle
.
SysStatusSensorGPS
)
failure
T
ext
=
qsTr
(
"
Failure. No valid or low quality GPS signal. Check console.
"
)
state
=
stateMajorIssue
}
}
...
...
src/FlightDisplay/PreFlightSoundCheck.qml
View file @
b9c5d2ed
...
...
@@ -15,8 +15,8 @@ import QGroundControl.Vehicle 1.0
PreFlightCheckButton
{
name
:
qsTr
(
"
Sound output
"
)
pending
t
ext
:
qsTr
(
"
QGC audio output enabled. System audio output enabled, too?
"
)
failure
t
ext
:
qsTr
(
"
Failure, QGC audio output is disabled. Please enable it under application settings->general to hear audio warnings!
"
)
pending
T
ext
:
qsTr
(
"
QGC audio output enabled. System audio output enabled, too?
"
)
failure
T
ext
:
qsTr
(
"
Failure, QGC audio output is disabled. Please enable it under application settings->general to hear audio warnings!
"
)
property
bool
_audioMuted
:
QGroundControl
.
settingsManager
.
appSettings
.
audioMuted
.
rawValue
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
...
...
src/QmlControls/DropPanel.qml
View file @
b9c5d2ed
...
...
@@ -120,6 +120,10 @@ Item {
Item
{
id
:
dropDownItem
DeadMouseArea
{
anchors.fill
:
parent
}
Canvas
{
id
:
arrowCanvas
anchors.fill
:
parent
...
...
@@ -161,5 +165,6 @@ Item {
property
var
dropPanel
:
_root
}
}
}
// Item - dropDownItem
}
src/QmlControls/PreFlightCheckButton.qml
View file @
b9c5d2ed
...
...
@@ -18,9 +18,9 @@ import QGroundControl.ScreenTools 1.0
QGCButton
{
property
string
name
:
""
property
int
group
:
0
property
string
default
t
ext
:
qsTr
(
"
Not checked yet
"
)
property
string
pending
t
ext
:
""
property
string
failure
t
ext
:
qsTr
(
"
Failure. Check console.
"
)
property
string
default
T
ext
:
qsTr
(
"
Not checked yet
"
)
property
string
pending
T
ext
:
""
property
string
failure
T
ext
:
qsTr
(
"
Failure. Check console.
"
)
property
int
state
:
stateNotChecked
readonly
property
int
stateNotChecked
:
0
...
...
@@ -31,7 +31,7 @@ QGCButton {
property
var
_color
:
qgcPal
.
button
property
int
_nrClicked
:
0
property
string
_text
:
name
+
"
:
"
+
default
t
ext
property
string
_text
:
name
+
"
:
"
+
default
T
ext
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
enabled
:
(
!
_activeVehicle
||
_activeVehicle
.
connectionLost
)
?
false
:
preFlightCheckList
.
_checkState
>=
group
...
...
@@ -48,8 +48,8 @@ QGCButton {
}
}
onPending
t
extChanged
:
{
if
(
state
===
statePending
)
{
getTextFromState
();
getColorFromState
();
}
}
onFailure
t
extChanged
:
{
if
(
state
===
stateMajorIssue
)
{
getTextFromState
();
getColorFromState
();
}
}
onPending
T
extChanged
:
{
if
(
state
===
statePending
)
{
getTextFromState
();
getColorFromState
();
}
}
onFailure
T
extChanged
:
{
if
(
state
===
stateMajorIssue
)
{
getTextFromState
();
getColorFromState
();
}
}
onStateChanged
:
{
getTextFromState
();
getColorFromState
();
}
onClicked
:
{
if
(
state
<=
statePending
)
{
...
...
@@ -60,12 +60,12 @@ QGCButton {
function
updateItem
()
{
// This is the default updateFunction. It assumes the item is a MANUAL check list item, i.e. one that
// only requires user clicks (one click if pending
t
ext="", two clicks otherwise) for completion.
// only requires user clicks (one click if pending
T
ext="", two clicks otherwise) for completion.
if
(
_nrClicked
===
0
)
{
state
=
stateNotChecked
}
else
if
(
_nrClicked
===
1
)
{
if
(
pending
t
ext
.
length
===
0
)
{
if
(
pending
T
ext
.
length
===
0
)
{
state
=
statePassed
}
else
{
state
=
statePending
...
...
@@ -80,13 +80,13 @@ QGCButton {
function
getTextFromState
()
{
if
(
state
===
stateNotChecked
)
{
_text
=
qsTr
(
name
)
+
"
:
"
+
qsTr
(
default
t
ext
)
_text
=
qsTr
(
name
)
+
"
:
"
+
qsTr
(
default
T
ext
)
}
else
if
(
state
===
statePending
)
{
_text
=
"
<b>
"
+
qsTr
(
name
)
+
"
</b>
"
+
"
:
"
+
pending
t
ext
_text
=
"
<b>
"
+
qsTr
(
name
)
+
"
</b>
"
+
"
:
"
+
pending
T
ext
}
else
if
(
state
===
stateMinorIssue
)
{
_text
=
"
<b>
"
+
qsTr
(
name
)
+
"
</b>
"
+
"
:
"
+
qsTr
(
"
Minor problem
"
)
}
else
if
(
state
===
stateMajorIssue
)
{
_text
=
"
<b>
"
+
qsTr
(
name
)
+
"
</b>
"
+
"
:
"
+
failure
t
ext
_text
=
"
<b>
"
+
qsTr
(
name
)
+
"
</b>
"
+
"
:
"
+
failure
T
ext
}
else
if
(
state
===
statePassed
)
{
_text
=
"
<b>
"
+
qsTr
(
name
)
+
"
</b>
"
+
"
:
"
+
qsTr
(
"
OK
"
)
}
else
{
...
...
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