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
a8d0bc33
Commit
a8d0bc33
authored
Apr 05, 2019
by
Gus Grubba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change setting from save logs to any data persistence.
parent
3c84bfab
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
31 deletions
+31
-31
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
+8
-8
MavlinkSettings.qml
src/ui/preferences/MavlinkSettings.qml
+15
-15
No files found.
src/Settings/App.SettingsGroup.json
View file @
a8d0bc33
...
@@ -237,10 +237,10 @@
...
@@ -237,10 +237,10 @@
"defaultValue"
:
0
"defaultValue"
:
0
},
},
{
{
"name"
:
"
enableLocalLogging
"
,
"name"
:
"
disableAllPersistence
"
,
"shortDescription"
:
"
Enable local telemetry logging
"
,
"shortDescription"
:
"
Disable all data persistence
"
,
"longDescription"
:
"If this option is
enabled telemetry logs from vehicle will be stor
ed to disk."
,
"longDescription"
:
"If this option is
set, nothing will be sav
ed to disk."
,
"type"
:
"bool"
,
"type"
:
"bool"
,
"defaultValue"
:
tru
e
"defaultValue"
:
fals
e
}
}
]
]
src/Settings/AppSettings.cc
View file @
a8d0bc33
...
@@ -94,7 +94,7 @@ DECLARE_SETTINGSFACT(AppSettings, enableTaisync)
...
@@ -94,7 +94,7 @@ DECLARE_SETTINGSFACT(AppSettings, enableTaisync)
DECLARE_SETTINGSFACT
(
AppSettings
,
enableTaisyncVideo
)
DECLARE_SETTINGSFACT
(
AppSettings
,
enableTaisyncVideo
)
DECLARE_SETTINGSFACT
(
AppSettings
,
enableMicrohard
)
DECLARE_SETTINGSFACT
(
AppSettings
,
enableMicrohard
)
DECLARE_SETTINGSFACT
(
AppSettings
,
language
)
DECLARE_SETTINGSFACT
(
AppSettings
,
language
)
DECLARE_SETTINGSFACT
(
AppSettings
,
enableLocalLogging
)
DECLARE_SETTINGSFACT
(
AppSettings
,
disableAllPersistence
)
DECLARE_SETTINGSFACT_NO_FUNC
(
AppSettings
,
indoorPalette
)
DECLARE_SETTINGSFACT_NO_FUNC
(
AppSettings
,
indoorPalette
)
{
{
...
...
src/Settings/AppSettings.h
View file @
a8d0bc33
...
@@ -48,7 +48,7 @@ public:
...
@@ -48,7 +48,7 @@ public:
DEFINE_SETTINGFACT
(
enableTaisyncVideo
)
DEFINE_SETTINGFACT
(
enableTaisyncVideo
)
DEFINE_SETTINGFACT
(
enableMicrohard
)
DEFINE_SETTINGFACT
(
enableMicrohard
)
DEFINE_SETTINGFACT
(
language
)
DEFINE_SETTINGFACT
(
language
)
DEFINE_SETTINGFACT
(
enableLocalLogging
)
DEFINE_SETTINGFACT
(
disableAllPersistence
)
// Although this is a global setting it only affects ArduPilot vehicle since PX4 automatically starts the stream from the vehicle side
// Although this is a global setting it only affects ArduPilot vehicle since PX4 automatically starts the stream from the vehicle side
DEFINE_SETTINGFACT
(
apmStartMavlinkStreams
)
DEFINE_SETTINGFACT
(
apmStartMavlinkStreams
)
...
...
src/comm/MAVLinkProtocol.cc
View file @
a8d0bc33
...
@@ -405,7 +405,7 @@ void MAVLinkProtocol::_startLogging(void)
...
@@ -405,7 +405,7 @@ void MAVLinkProtocol::_startLogging(void)
return
;
return
;
}
}
AppSettings
*
appSettings
=
_app
->
toolbox
()
->
settingsManager
()
->
appSettings
();
AppSettings
*
appSettings
=
_app
->
toolbox
()
->
settingsManager
()
->
appSettings
();
if
(
!
appSettings
->
enableLocalLogging
()
->
rawValue
().
toBool
())
{
if
(
appSettings
->
disableAllPersistence
()
->
rawValue
().
toBool
())
{
return
;
return
;
}
}
#ifdef __mobile__
#ifdef __mobile__
...
@@ -440,7 +440,7 @@ void MAVLinkProtocol::_stopLogging(void)
...
@@ -440,7 +440,7 @@ void MAVLinkProtocol::_stopLogging(void)
if
(
_closeLogFile
())
{
if
(
_closeLogFile
())
{
if
((
_vehicleWasArmed
||
_app
->
toolbox
()
->
settingsManager
()
->
appSettings
()
->
telemetrySaveNotArmed
()
->
rawValue
().
toBool
())
&&
if
((
_vehicleWasArmed
||
_app
->
toolbox
()
->
settingsManager
()
->
appSettings
()
->
telemetrySaveNotArmed
()
->
rawValue
().
toBool
())
&&
_app
->
toolbox
()
->
settingsManager
()
->
appSettings
()
->
telemetrySave
()
->
rawValue
().
toBool
()
&&
_app
->
toolbox
()
->
settingsManager
()
->
appSettings
()
->
telemetrySave
()
->
rawValue
().
toBool
()
&&
_app
->
toolbox
()
->
settingsManager
()
->
appSettings
()
->
enableLocalLogging
()
->
rawValue
().
toBool
())
{
!
_app
->
toolbox
()
->
settingsManager
()
->
appSettings
()
->
disableAllPersistence
()
->
rawValue
().
toBool
())
{
emit
saveTelemetryLog
(
_tempLogFile
.
fileName
());
emit
saveTelemetryLog
(
_tempLogFile
.
fileName
());
}
else
{
}
else
{
QFile
::
remove
(
_tempLogFile
.
fileName
());
QFile
::
remove
(
_tempLogFile
.
fileName
());
...
...
src/ui/preferences/GeneralSettings.qml
View file @
a8d0bc33
...
@@ -356,7 +356,7 @@ QGCView {
...
@@ -356,7 +356,7 @@ QGCView {
Item
{
width
:
1
;
height
:
_margins
}
Item
{
width
:
1
;
height
:
_margins
}
QGCLabel
{
QGCLabel
{
id
:
loggingSectionLabel
id
:
loggingSectionLabel
text
:
qsTr
(
"
Telemetry Logs from Vehicl
e
"
)
text
:
qsTr
(
"
Data Persistenc
e
"
)
}
}
Rectangle
{
Rectangle
{
Layout.preferredHeight
:
loggingCol
.
height
+
(
_margins
*
2
)
Layout.preferredHeight
:
loggingCol
.
height
+
(
_margins
*
2
)
...
@@ -370,18 +370,18 @@ QGCView {
...
@@ -370,18 +370,18 @@ QGCView {
anchors.horizontalCenter
:
parent
.
horizontalCenter
anchors.horizontalCenter
:
parent
.
horizontalCenter
spacing
:
_margins
spacing
:
_margins
FactCheckBox
{
FactCheckBox
{
id
:
enableLogging
id
:
disableDataPersistence
text
:
qsTr
(
"
Save logs to disk
"
)
text
:
qsTr
(
"
Disable all data persistence
"
)
fact
:
_
enableLogging
fact
:
_
disableDataPersistence
visible
:
_
enableLogging
.
visible
visible
:
_
disableDataPersistence
.
visible
property
Fact
_
enableLogging
:
QGroundControl
.
settingsManager
.
appSettings
.
enableLocalLogging
property
Fact
_
disableDataPersistence
:
QGroundControl
.
settingsManager
.
appSettings
.
disableAllPersistence
}
}
FactCheckBox
{
FactCheckBox
{
id
:
promptSaveLog
id
:
promptSaveLog
text
:
qsTr
(
"
Save log after each flight
"
)
text
:
qsTr
(
"
Save log after each flight
"
)
fact
:
_telemetrySave
fact
:
_telemetrySave
visible
:
_telemetrySave
.
visible
visible
:
_telemetrySave
.
visible
enabled
:
enableLogging
.
checked
enabled
:
!
disableDataPersistence
.
checked
property
Fact
_telemetrySave
:
QGroundControl
.
settingsManager
.
appSettings
.
telemetrySave
property
Fact
_telemetrySave
:
QGroundControl
.
settingsManager
.
appSettings
.
telemetrySave
}
}
FactCheckBox
{
FactCheckBox
{
...
@@ -389,7 +389,7 @@ QGCView {
...
@@ -389,7 +389,7 @@ QGCView {
text
:
qsTr
(
"
Save logs even if vehicle was not armed
"
)
text
:
qsTr
(
"
Save logs even if vehicle was not armed
"
)
fact
:
_telemetrySaveNotArmed
fact
:
_telemetrySaveNotArmed
visible
:
_telemetrySaveNotArmed
.
visible
visible
:
_telemetrySaveNotArmed
.
visible
enabled
:
promptSaveLog
.
checked
&&
enableLogging
.
checked
enabled
:
promptSaveLog
.
checked
&&
!
disableDataPersistence
.
checked
property
Fact
_telemetrySaveNotArmed
:
QGroundControl
.
settingsManager
.
appSettings
.
telemetrySaveNotArmed
property
Fact
_telemetrySaveNotArmed
:
QGroundControl
.
settingsManager
.
appSettings
.
telemetrySaveNotArmed
}
}
}
}
...
...
src/ui/preferences/MavlinkSettings.qml
View file @
a8d0bc33
...
@@ -35,8 +35,8 @@ Rectangle {
...
@@ -35,8 +35,8 @@ Rectangle {
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
property
bool
_showMavlinkLog
:
QGroundControl
.
corePlugin
.
options
.
showMavlinkLogOptions
property
bool
_showMavlinkLog
:
QGroundControl
.
corePlugin
.
options
.
showMavlinkLogOptions
property
bool
_showAPMStreamRates
:
QGroundControl
.
apmFirmwareSupported
&&
QGroundControl
.
settingsManager
.
apmMavlinkStreamRateSettings
.
visible
property
bool
_showAPMStreamRates
:
QGroundControl
.
apmFirmwareSupported
&&
QGroundControl
.
settingsManager
.
apmMavlinkStreamRateSettings
.
visible
property
Fact
_
enableLoggingFact
:
QGroundControl
.
settingsManager
.
appSettings
.
enableLocalLogging
property
Fact
_
disableDataPersistenceFact
:
QGroundControl
.
settingsManager
.
appSettings
.
disableAllPersistence
property
bool
_
enableLogging
:
_enableLoggingFact
?
_enableLoggingFact
.
rawValue
:
tru
e
property
bool
_
disableDataPersistence
:
_disableDataPersistenceFact
?
_disableDataPersistenceFact
.
rawValue
:
fals
e
QGCPalette
{
id
:
qgcPal
}
QGCPalette
{
id
:
qgcPal
}
...
@@ -372,14 +372,14 @@ Rectangle {
...
@@ -372,14 +372,14 @@ Rectangle {
QGCButton
{
QGCButton
{
text
:
qsTr
(
"
Start Logging
"
)
text
:
qsTr
(
"
Start Logging
"
)
width
:
(
_valueWidth
*
0.5
)
-
(
ScreenTools
.
defaultFontPixelWidth
*
0.5
)
width
:
(
_valueWidth
*
0.5
)
-
(
ScreenTools
.
defaultFontPixelWidth
*
0.5
)
enabled
:
!
QGroundControl
.
mavlinkLogManager
.
logRunning
&&
QGroundControl
.
mavlinkLogManager
.
canStartLog
&&
_enableLogging
enabled
:
!
QGroundControl
.
mavlinkLogManager
.
logRunning
&&
QGroundControl
.
mavlinkLogManager
.
canStartLog
&&
!
_disableDataPersistence
onClicked
:
QGroundControl
.
mavlinkLogManager
.
startLogging
()
onClicked
:
QGroundControl
.
mavlinkLogManager
.
startLogging
()
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
QGCButton
{
QGCButton
{
text
:
qsTr
(
"
Stop Logging
"
)
text
:
qsTr
(
"
Stop Logging
"
)
width
:
(
_valueWidth
*
0.5
)
-
(
ScreenTools
.
defaultFontPixelWidth
*
0.5
)
width
:
(
_valueWidth
*
0.5
)
-
(
ScreenTools
.
defaultFontPixelWidth
*
0.5
)
enabled
:
QGroundControl
.
mavlinkLogManager
.
logRunning
&&
_enableLogging
enabled
:
QGroundControl
.
mavlinkLogManager
.
logRunning
&&
!
_disableDataPersistence
onClicked
:
QGroundControl
.
mavlinkLogManager
.
stopLogging
()
onClicked
:
QGroundControl
.
mavlinkLogManager
.
stopLogging
()
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
...
@@ -389,7 +389,7 @@ Rectangle {
...
@@ -389,7 +389,7 @@ Rectangle {
QGCCheckBox
{
QGCCheckBox
{
text
:
qsTr
(
"
Enable automatic logging
"
)
text
:
qsTr
(
"
Enable automatic logging
"
)
checked
:
QGroundControl
.
mavlinkLogManager
.
enableAutoStart
checked
:
QGroundControl
.
mavlinkLogManager
.
enableAutoStart
enabled
:
_enableLogging
enabled
:
!
_disableDataPersistence
onClicked
:
{
onClicked
:
{
QGroundControl
.
mavlinkLogManager
.
enableAutoStart
=
checked
QGroundControl
.
mavlinkLogManager
.
enableAutoStart
=
checked
}
}
...
@@ -434,7 +434,7 @@ Rectangle {
...
@@ -434,7 +434,7 @@ Rectangle {
id
:
emailField
id
:
emailField
text
:
QGroundControl
.
mavlinkLogManager
.
emailAddress
text
:
QGroundControl
.
mavlinkLogManager
.
emailAddress
width
:
_valueWidth
width
:
_valueWidth
enabled
:
_enableLogging
enabled
:
!
_disableDataPersistence
inputMethodHints
:
Qt
.
ImhNoAutoUppercase
|
Qt
.
ImhEmailCharactersOnly
inputMethodHints
:
Qt
.
ImhNoAutoUppercase
|
Qt
.
ImhEmailCharactersOnly
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.verticalCenter
:
parent
.
verticalCenter
onEditingFinished
:
{
onEditingFinished
:
{
...
@@ -455,7 +455,7 @@ Rectangle {
...
@@ -455,7 +455,7 @@ Rectangle {
id
:
descField
id
:
descField
text
:
QGroundControl
.
mavlinkLogManager
.
description
text
:
QGroundControl
.
mavlinkLogManager
.
description
width
:
_valueWidth
width
:
_valueWidth
enabled
:
_enableLogging
enabled
:
!
_disableDataPersistence
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.verticalCenter
:
parent
.
verticalCenter
onEditingFinished
:
{
onEditingFinished
:
{
saveItems
();
saveItems
();
...
@@ -475,7 +475,7 @@ Rectangle {
...
@@ -475,7 +475,7 @@ Rectangle {
id
:
urlField
id
:
urlField
text
:
QGroundControl
.
mavlinkLogManager
.
uploadURL
text
:
QGroundControl
.
mavlinkLogManager
.
uploadURL
width
:
_valueWidth
width
:
_valueWidth
enabled
:
_enableLogging
enabled
:
!
_disableDataPersistence
inputMethodHints
:
Qt
.
ImhNoAutoUppercase
|
Qt
.
ImhUrlCharactersOnly
inputMethodHints
:
Qt
.
ImhNoAutoUppercase
|
Qt
.
ImhUrlCharactersOnly
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.verticalCenter
:
parent
.
verticalCenter
onEditingFinished
:
{
onEditingFinished
:
{
...
@@ -496,7 +496,7 @@ Rectangle {
...
@@ -496,7 +496,7 @@ Rectangle {
id
:
videoUrlField
id
:
videoUrlField
text
:
QGroundControl
.
mavlinkLogManager
.
videoURL
text
:
QGroundControl
.
mavlinkLogManager
.
videoURL
width
:
_valueWidth
width
:
_valueWidth
enabled
:
_enableLogging
enabled
:
!
_disableDataPersistence
inputMethodHints
:
Qt
.
ImhNoAutoUppercase
|
Qt
.
ImhUrlCharactersOnly
inputMethodHints
:
Qt
.
ImhNoAutoUppercase
|
Qt
.
ImhUrlCharactersOnly
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
...
@@ -513,7 +513,7 @@ Rectangle {
...
@@ -513,7 +513,7 @@ Rectangle {
QGCComboBox
{
QGCComboBox
{
id
:
windCombo
id
:
windCombo
width
:
_valueWidth
width
:
_valueWidth
enabled
:
_enableLogging
enabled
:
!
_disableDataPersistence
model
:
ListModel
{
model
:
ListModel
{
id
:
windItems
id
:
windItems
ListElement
{
text
:
"
Please Select
"
;
value
:
-
1
}
ListElement
{
text
:
"
Please Select
"
;
value
:
-
1
}
...
@@ -550,7 +550,7 @@ Rectangle {
...
@@ -550,7 +550,7 @@ Rectangle {
QGCComboBox
{
QGCComboBox
{
id
:
ratingCombo
id
:
ratingCombo
width
:
_valueWidth
width
:
_valueWidth
enabled
:
_enableLogging
enabled
:
!
_disableDataPersistence
model
:
ListModel
{
model
:
ListModel
{
id
:
ratingItems
id
:
ratingItems
ListElement
{
text
:
"
Please Select
"
;
value
:
"
notset
"
}
ListElement
{
text
:
"
Please Select
"
;
value
:
"
notset
"
}
...
@@ -591,7 +591,7 @@ Rectangle {
...
@@ -591,7 +591,7 @@ Rectangle {
frameVisible
:
false
frameVisible
:
false
font.pointSize
:
ScreenTools
.
defaultFontPointSize
font.pointSize
:
ScreenTools
.
defaultFontPointSize
text
:
QGroundControl
.
mavlinkLogManager
.
feedback
text
:
QGroundControl
.
mavlinkLogManager
.
feedback
enabled
:
_enableLogging
enabled
:
!
_disableDataPersistence
style
:
TextAreaStyle
{
style
:
TextAreaStyle
{
textColor
:
qgcPal
.
windowShade
textColor
:
qgcPal
.
windowShade
backgroundColor
:
qgcPal
.
text
backgroundColor
:
qgcPal
.
text
...
@@ -603,7 +603,7 @@ Rectangle {
...
@@ -603,7 +603,7 @@ Rectangle {
QGCCheckBox
{
QGCCheckBox
{
text
:
qsTr
(
"
Make this log publicly available
"
)
text
:
qsTr
(
"
Make this log publicly available
"
)
checked
:
QGroundControl
.
mavlinkLogManager
.
publicLog
checked
:
QGroundControl
.
mavlinkLogManager
.
publicLog
enabled
:
_enableLogging
enabled
:
!
_disableDataPersistence
onClicked
:
{
onClicked
:
{
QGroundControl
.
mavlinkLogManager
.
publicLog
=
checked
QGroundControl
.
mavlinkLogManager
.
publicLog
=
checked
}
}
...
@@ -614,7 +614,7 @@ Rectangle {
...
@@ -614,7 +614,7 @@ Rectangle {
id
:
autoUploadCheck
id
:
autoUploadCheck
text
:
qsTr
(
"
Enable automatic log uploads
"
)
text
:
qsTr
(
"
Enable automatic log uploads
"
)
checked
:
QGroundControl
.
mavlinkLogManager
.
enableAutoUpload
checked
:
QGroundControl
.
mavlinkLogManager
.
enableAutoUpload
enabled
:
_enableLogging
enabled
:
!
_disableDataPersistence
onClicked
:
{
onClicked
:
{
saveItems
();
saveItems
();
if
(
checked
&&
QGroundControl
.
mavlinkLogManager
.
emailAddress
===
""
)
if
(
checked
&&
QGroundControl
.
mavlinkLogManager
.
emailAddress
===
""
)
...
@@ -626,7 +626,7 @@ Rectangle {
...
@@ -626,7 +626,7 @@ Rectangle {
QGCCheckBox
{
QGCCheckBox
{
text
:
qsTr
(
"
Delete log file after uploading
"
)
text
:
qsTr
(
"
Delete log file after uploading
"
)
checked
:
QGroundControl
.
mavlinkLogManager
.
deleteAfterUpload
checked
:
QGroundControl
.
mavlinkLogManager
.
deleteAfterUpload
enabled
:
autoUploadCheck
.
checked
&&
_enableLogging
enabled
:
autoUploadCheck
.
checked
&&
!
_disableDataPersistence
onClicked
:
{
onClicked
:
{
QGroundControl
.
mavlinkLogManager
.
deleteAfterUpload
=
checked
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