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
fe28ea83
Commit
fe28ea83
authored
Apr 04, 2019
by
Gus Grubba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Flipped enable logging logic
Grouped logging options within General Settings
parent
675466bd
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
75 additions
and
57 deletions
+75
-57
SafetyComponent.qml
src/AutoPilotPlugins/PX4/SafetyComponent.qml
+10
-9
App.SettingsGroup.json
src/Settings/App.SettingsGroup.json
+4
-4
AppSettings.cc
src/Settings/AppSettings.cc
+1
-1
AppSettings.h
src/Settings/AppSettings.h
+1
-1
MAVLinkProtocol.cc
src/comm/MAVLinkProtocol.cc
+2
-2
GeneralSettings.qml
src/ui/preferences/GeneralSettings.qml
+42
-25
MavlinkSettings.qml
src/ui/preferences/MavlinkSettings.qml
+15
-15
No files found.
src/AutoPilotPlugins/PX4/SafetyComponent.qml
View file @
fe28ea83
...
...
@@ -43,7 +43,7 @@ SetupPage {
property
real
_imageWidth
:
ScreenTools
.
defaultFontPixelWidth
*
15
property
real
_imageHeight
:
ScreenTools
.
defaultFontPixelHeight
*
3
property
Fact
_
disableLogging
:
controller
.
getParameterFact
(
-
1
,
"
SDLOG_MODE
"
)
property
Fact
_
enableLogging
:
controller
.
getParameterFact
(
-
1
,
"
SDLOG_MODE
"
)
property
Fact
_fenceAction
:
controller
.
getParameterFact
(
-
1
,
"
GF_ACTION
"
)
property
Fact
_fenceRadius
:
controller
.
getParameterFact
(
-
1
,
"
GF_MAX_HOR_DIST
"
)
property
Fact
_fenceAlt
:
controller
.
getParameterFact
(
-
1
,
"
GF_MAX_VER_DIST
"
)
...
...
@@ -498,7 +498,7 @@ SetupPage {
Item
{
width
:
1
;
height
:
_margins
;
Layout.columnSpan
:
3
}
QGCLabel
{
text
:
qsTr
(
"
Vehicle Logging
"
)
text
:
qsTr
(
"
Vehicle
Telemetry
Logging
"
)
Layout.columnSpan
:
3
}
...
...
@@ -507,10 +507,11 @@ SetupPage {
Item
{
width
:
_margins
;
height
:
1
}
GridLayout
{
id
:
loggingGrid
columns
:
4
id
:
loggingGrid
columns
:
4
columnSpacing
:
ScreenTools
.
defaultFontPixelWidth
*
4
Item
{
Layout.fillWidth
:
true
Layout.fillWidth
:
true
}
Image
{
mipmap
:
true
...
...
@@ -522,13 +523,13 @@ SetupPage {
height
:
_imageHeight
}
QGCCheckBox
{
text
:
qsTr
(
"
Disable vehicle logging
"
)
checkedState
:
_
disableLogging
?
(
_disableLogging
.
value
<
0
?
Qt
.
Checked
:
Qt
.
Unchecked
)
:
Qt
.
Unchecked
text
:
qsTr
(
"
Enable telemetry logging to vehicle storage
"
)
checkedState
:
_
enableLogging
?
(
_enableLogging
.
value
>=
0
?
Qt
.
Checked
:
Qt
.
Unchecked
)
:
Qt
.
Unchecked
Layout.minimumWidth
:
_editFieldWidth
Layout.alignment
:
Qt
.
AlignVCenter
onClicked
:
{
if
(
_
dis
ableLogging
)
{
_
disableLogging
.
value
=
checked
?
-
1
:
0
if
(
_
en
ableLogging
)
{
_
enableLogging
.
value
=
checked
?
0
:
-
1
}
}
}
...
...
src/Settings/App.SettingsGroup.json
View file @
fe28ea83
...
...
@@ -237,10 +237,10 @@
"defaultValue"
:
0
},
{
"name"
:
"
dis
ableLocalLogging"
,
"shortDescription"
:
"
Disable local
logging"
,
"longDescription"
:
"If this option is enabled
nothing
will be stored to disk."
,
"name"
:
"
en
ableLocalLogging"
,
"shortDescription"
:
"
Enable local telemetry
logging"
,
"longDescription"
:
"If this option is enabled
telemetry logs from vehicle
will be stored to disk."
,
"type"
:
"bool"
,
"defaultValue"
:
fals
e
"defaultValue"
:
tru
e
}
]
src/Settings/AppSettings.cc
View file @
fe28ea83
...
...
@@ -94,7 +94,7 @@ DECLARE_SETTINGSFACT(AppSettings, enableTaisync)
DECLARE_SETTINGSFACT
(
AppSettings
,
enableTaisyncVideo
)
DECLARE_SETTINGSFACT
(
AppSettings
,
enableMicrohard
)
DECLARE_SETTINGSFACT
(
AppSettings
,
language
)
DECLARE_SETTINGSFACT
(
AppSettings
,
dis
ableLocalLogging
)
DECLARE_SETTINGSFACT
(
AppSettings
,
en
ableLocalLogging
)
DECLARE_SETTINGSFACT_NO_FUNC
(
AppSettings
,
indoorPalette
)
{
...
...
src/Settings/AppSettings.h
View file @
fe28ea83
...
...
@@ -48,7 +48,7 @@ public:
DEFINE_SETTINGFACT
(
enableTaisyncVideo
)
DEFINE_SETTINGFACT
(
enableMicrohard
)
DEFINE_SETTINGFACT
(
language
)
DEFINE_SETTINGFACT
(
dis
ableLocalLogging
)
DEFINE_SETTINGFACT
(
en
ableLocalLogging
)
// Although this is a global setting it only affects ArduPilot vehicle since PX4 automatically starts the stream from the vehicle side
DEFINE_SETTINGFACT
(
apmStartMavlinkStreams
)
...
...
src/comm/MAVLinkProtocol.cc
View file @
fe28ea83
...
...
@@ -405,7 +405,7 @@ void MAVLinkProtocol::_startLogging(void)
return
;
}
AppSettings
*
appSettings
=
_app
->
toolbox
()
->
settingsManager
()
->
appSettings
();
if
(
appSettings
->
dis
ableLocalLogging
()
->
rawValue
().
toBool
())
{
if
(
!
appSettings
->
en
ableLocalLogging
()
->
rawValue
().
toBool
())
{
return
;
}
#ifdef __mobile__
...
...
@@ -440,7 +440,7 @@ void MAVLinkProtocol::_stopLogging(void)
if
(
_closeLogFile
())
{
if
((
_vehicleWasArmed
||
_app
->
toolbox
()
->
settingsManager
()
->
appSettings
()
->
telemetrySaveNotArmed
()
->
rawValue
().
toBool
())
&&
_app
->
toolbox
()
->
settingsManager
()
->
appSettings
()
->
telemetrySave
()
->
rawValue
().
toBool
()
&&
!
_app
->
toolbox
()
->
settingsManager
()
->
appSettings
()
->
dis
ableLocalLogging
()
->
rawValue
().
toBool
())
{
_app
->
toolbox
()
->
settingsManager
()
->
appSettings
()
->
en
ableLocalLogging
()
->
rawValue
().
toBool
())
{
emit
saveTelemetryLog
(
_tempLogFile
.
fileName
());
}
else
{
QFile
::
remove
(
_tempLogFile
.
fileName
());
...
...
src/ui/preferences/GeneralSettings.qml
View file @
fe28ea83
...
...
@@ -262,31 +262,6 @@ QGCView {
property
Fact
_audioMuted
:
QGroundControl
.
settingsManager
.
appSettings
.
audioMuted
}
FactCheckBox
{
id
:
disableLogging
text
:
qsTr
(
"
Disable local logging
"
)
fact
:
_disableLogging
visible
:
_disableLogging
.
visible
property
Fact
_disableLogging
:
QGroundControl
.
settingsManager
.
appSettings
.
disableLocalLogging
}
FactCheckBox
{
id
:
promptSaveLog
text
:
qsTr
(
"
Save telemetry log after each flight
"
)
fact
:
_telemetrySave
visible
:
_telemetrySave
.
visible
enabled
:
!
disableLogging
.
checked
property
Fact
_telemetrySave
:
QGroundControl
.
settingsManager
.
appSettings
.
telemetrySave
}
FactCheckBox
{
text
:
qsTr
(
"
Save telemetry log even if vehicle was not armed
"
)
fact
:
_telemetrySaveNotArmed
visible
:
_telemetrySaveNotArmed
.
visible
enabled
:
promptSaveLog
.
checked
&&
!
disableLogging
.
checked
property
Fact
_telemetrySaveNotArmed
:
QGroundControl
.
settingsManager
.
appSettings
.
telemetrySaveNotArmed
}
FactCheckBox
{
text
:
qsTr
(
"
AutoLoad Missions
"
)
fact
:
_autoLoad
...
...
@@ -378,6 +353,48 @@ QGCView {
}
}
Item
{
width
:
1
;
height
:
_margins
}
QGCLabel
{
id
:
loggingSectionLabel
text
:
qsTr
(
"
Telemetry Logs from Vehicle
"
)
}
Rectangle
{
Layout.preferredHeight
:
loggingCol
.
height
+
(
_margins
*
2
)
Layout.preferredWidth
:
loggingCol
.
width
+
(
_margins
*
2
)
color
:
qgcPal
.
windowShade
Layout.fillWidth
:
true
ColumnLayout
{
id
:
loggingCol
anchors.margins
:
_margins
anchors.top
:
parent
.
top
anchors.horizontalCenter
:
parent
.
horizontalCenter
spacing
:
_margins
FactCheckBox
{
id
:
enableLogging
text
:
qsTr
(
"
Save telemetry logs to disk
"
)
fact
:
_enableLogging
visible
:
_enableLogging
.
visible
property
Fact
_enableLogging
:
QGroundControl
.
settingsManager
.
appSettings
.
enableLocalLogging
}
FactCheckBox
{
id
:
promptSaveLog
text
:
qsTr
(
"
Save telemetry log after each flight
"
)
fact
:
_telemetrySave
visible
:
_telemetrySave
.
visible
enabled
:
enableLogging
.
checked
property
Fact
_telemetrySave
:
QGroundControl
.
settingsManager
.
appSettings
.
telemetrySave
}
FactCheckBox
{
id
:
logIfNotArmed
text
:
qsTr
(
"
Save telemetry logs even if vehicle was not armed
"
)
fact
:
_telemetrySaveNotArmed
visible
:
_telemetrySaveNotArmed
.
visible
enabled
:
promptSaveLog
.
checked
&&
enableLogging
.
checked
property
Fact
_telemetrySaveNotArmed
:
QGroundControl
.
settingsManager
.
appSettings
.
telemetrySaveNotArmed
}
}
}
Item
{
width
:
1
;
height
:
_margins
}
QGCLabel
{
...
...
src/ui/preferences/MavlinkSettings.qml
View file @
fe28ea83
...
...
@@ -35,8 +35,8 @@ Rectangle {
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
property
bool
_showMavlinkLog
:
QGroundControl
.
corePlugin
.
options
.
showMavlinkLogOptions
property
bool
_showAPMStreamRates
:
QGroundControl
.
apmFirmwareSupported
&&
QGroundControl
.
settingsManager
.
apmMavlinkStreamRateSettings
.
visible
property
Fact
_
disableLoggingFact
:
QGroundControl
.
settingsManager
.
appSettings
.
dis
ableLocalLogging
property
bool
_
disableLogging
:
_disableLogging
?
_disableLogging
.
rawValue
:
fals
e
property
Fact
_
enableLoggingFact
:
QGroundControl
.
settingsManager
.
appSettings
.
en
ableLocalLogging
property
bool
_
enableLogging
:
_enableLoggingFact
?
_enableLoggingFact
.
rawValue
:
tru
e
QGCPalette
{
id
:
qgcPal
}
...
...
@@ -372,14 +372,14 @@ Rectangle {
QGCButton
{
text
:
qsTr
(
"
Start Logging
"
)
width
:
(
_valueWidth
*
0.5
)
-
(
ScreenTools
.
defaultFontPixelWidth
*
0.5
)
enabled
:
!
QGroundControl
.
mavlinkLogManager
.
logRunning
&&
QGroundControl
.
mavlinkLogManager
.
canStartLog
&&
!
_dis
ableLogging
enabled
:
!
QGroundControl
.
mavlinkLogManager
.
logRunning
&&
QGroundControl
.
mavlinkLogManager
.
canStartLog
&&
_en
ableLogging
onClicked
:
QGroundControl
.
mavlinkLogManager
.
startLogging
()
anchors.verticalCenter
:
parent
.
verticalCenter
}
QGCButton
{
text
:
qsTr
(
"
Stop Logging
"
)
width
:
(
_valueWidth
*
0.5
)
-
(
ScreenTools
.
defaultFontPixelWidth
*
0.5
)
enabled
:
QGroundControl
.
mavlinkLogManager
.
logRunning
&&
!
_dis
ableLogging
enabled
:
QGroundControl
.
mavlinkLogManager
.
logRunning
&&
_en
ableLogging
onClicked
:
QGroundControl
.
mavlinkLogManager
.
stopLogging
()
anchors.verticalCenter
:
parent
.
verticalCenter
}
...
...
@@ -389,7 +389,7 @@ Rectangle {
QGCCheckBox
{
text
:
qsTr
(
"
Enable automatic logging
"
)
checked
:
QGroundControl
.
mavlinkLogManager
.
enableAutoStart
enabled
:
!
_dis
ableLogging
enabled
:
_en
ableLogging
onClicked
:
{
QGroundControl
.
mavlinkLogManager
.
enableAutoStart
=
checked
}
...
...
@@ -434,7 +434,7 @@ Rectangle {
id
:
emailField
text
:
QGroundControl
.
mavlinkLogManager
.
emailAddress
width
:
_valueWidth
enabled
:
!
_dis
ableLogging
enabled
:
_en
ableLogging
inputMethodHints
:
Qt
.
ImhNoAutoUppercase
|
Qt
.
ImhEmailCharactersOnly
anchors.verticalCenter
:
parent
.
verticalCenter
onEditingFinished
:
{
...
...
@@ -455,7 +455,7 @@ Rectangle {
id
:
descField
text
:
QGroundControl
.
mavlinkLogManager
.
description
width
:
_valueWidth
enabled
:
!
_dis
ableLogging
enabled
:
_en
ableLogging
anchors.verticalCenter
:
parent
.
verticalCenter
onEditingFinished
:
{
saveItems
();
...
...
@@ -475,7 +475,7 @@ Rectangle {
id
:
urlField
text
:
QGroundControl
.
mavlinkLogManager
.
uploadURL
width
:
_valueWidth
enabled
:
!
_dis
ableLogging
enabled
:
_en
ableLogging
inputMethodHints
:
Qt
.
ImhNoAutoUppercase
|
Qt
.
ImhUrlCharactersOnly
anchors.verticalCenter
:
parent
.
verticalCenter
onEditingFinished
:
{
...
...
@@ -496,7 +496,7 @@ Rectangle {
id
:
videoUrlField
text
:
QGroundControl
.
mavlinkLogManager
.
videoURL
width
:
_valueWidth
enabled
:
!
_dis
ableLogging
enabled
:
_en
ableLogging
inputMethodHints
:
Qt
.
ImhNoAutoUppercase
|
Qt
.
ImhUrlCharactersOnly
anchors.verticalCenter
:
parent
.
verticalCenter
}
...
...
@@ -513,7 +513,7 @@ Rectangle {
QGCComboBox
{
id
:
windCombo
width
:
_valueWidth
enabled
:
!
_dis
ableLogging
enabled
:
_en
ableLogging
model
:
ListModel
{
id
:
windItems
ListElement
{
text
:
"
Please Select
"
;
value
:
-
1
}
...
...
@@ -550,7 +550,7 @@ Rectangle {
QGCComboBox
{
id
:
ratingCombo
width
:
_valueWidth
enabled
:
!
_dis
ableLogging
enabled
:
_en
ableLogging
model
:
ListModel
{
id
:
ratingItems
ListElement
{
text
:
"
Please Select
"
;
value
:
"
notset
"
}
...
...
@@ -591,7 +591,7 @@ Rectangle {
frameVisible
:
false
font.pointSize
:
ScreenTools
.
defaultFontPointSize
text
:
QGroundControl
.
mavlinkLogManager
.
feedback
enabled
:
!
_dis
ableLogging
enabled
:
_en
ableLogging
style
:
TextAreaStyle
{
textColor
:
qgcPal
.
windowShade
backgroundColor
:
qgcPal
.
text
...
...
@@ -603,7 +603,7 @@ Rectangle {
QGCCheckBox
{
text
:
qsTr
(
"
Make this log publicly available
"
)
checked
:
QGroundControl
.
mavlinkLogManager
.
publicLog
enabled
:
!
_dis
ableLogging
enabled
:
_en
ableLogging
onClicked
:
{
QGroundControl
.
mavlinkLogManager
.
publicLog
=
checked
}
...
...
@@ -614,7 +614,7 @@ Rectangle {
id
:
autoUploadCheck
text
:
qsTr
(
"
Enable automatic log uploads
"
)
checked
:
QGroundControl
.
mavlinkLogManager
.
enableAutoUpload
enabled
:
!
_dis
ableLogging
enabled
:
_en
ableLogging
onClicked
:
{
saveItems
();
if
(
checked
&&
QGroundControl
.
mavlinkLogManager
.
emailAddress
===
""
)
...
...
@@ -626,7 +626,7 @@ Rectangle {
QGCCheckBox
{
text
:
qsTr
(
"
Delete log file after uploading
"
)
checked
:
QGroundControl
.
mavlinkLogManager
.
deleteAfterUpload
enabled
:
autoUploadCheck
.
checked
&&
!
_dis
ableLogging
enabled
:
autoUploadCheck
.
checked
&&
_en
ableLogging
onClicked
:
{
QGroundControl
.
mavlinkLogManager
.
deleteAfterUpload
=
checked
}
...
...
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