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
c6e7d15d
Commit
c6e7d15d
authored
Mar 27, 2019
by
Gus Grubba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for disabling logs
parent
ace62122
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
190 additions
and
40 deletions
+190
-40
qgcresources.qrc
qgcresources.qrc
+2
-0
no-logging-light.svg
src/AutoPilotPlugins/PX4/Images/no-logging-light.svg
+29
-0
no-logging.svg
src/AutoPilotPlugins/PX4/Images/no-logging.svg
+30
-0
SafetyComponent.qml
src/AutoPilotPlugins/PX4/SafetyComponent.qml
+57
-5
App.SettingsGroup.json
src/Settings/App.SettingsGroup.json
+7
-0
AppSettings.cc
src/Settings/AppSettings.cc
+3
-1
AppSettings.h
src/Settings/AppSettings.h
+1
-0
Vehicle.h
src/Vehicle/Vehicle.h
+4
-4
MAVLinkProtocol.cc
src/comm/MAVLinkProtocol.cc
+7
-2
GeneralSettings.qml
src/ui/preferences/GeneralSettings.qml
+11
-1
MavlinkSettings.qml
src/ui/preferences/MavlinkSettings.qml
+39
-27
No files found.
qgcresources.qrc
View file @
c6e7d15d
...
...
@@ -186,6 +186,8 @@
<file alias="AlertAircraft.svg">src/FlightMap/Images/AlertAircraft.svg</file>
<file alias="AwarenessAircraft.svg">src/FlightMap/Images/AwarenessAircraft.svg</file>
<file alias="check.svg">resources/check.svg</file>
<file alias="no-logging.svg">src/AutoPilotPlugins/PX4/Images/no-logging.svg</file>
<file alias="no-logging-light.svg">src/AutoPilotPlugins/PX4/Images/no-logging-light.svg</file>
</qresource>
<qresource prefix="/res">
<file alias="action.svg">resources/action.svg</file>
...
...
src/AutoPilotPlugins/PX4/Images/no-logging-light.svg
0 → 100644
View file @
c6e7d15d
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
version=
"1.1"
id=
"Layer_1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
x=
"0px"
y=
"0px"
viewBox=
"0 0 72 72"
style=
"enable-background:new 0 0 72 72;"
xml:space=
"preserve"
>
<style
type=
"text/css"
>
.st0{fill:none;stroke:#A10000;stroke-width:4;stroke-linecap:round;stroke-miterlimit:10;}
.st1{fill:none;stroke:#A10000;stroke-width:4;stroke-miterlimit:10;}
</style>
<path
d=
"M18.089,56.362c-2.034,0-3.689-1.655-3.689-3.689V19.327c0-2.034,1.655-3.689,3.689-3.689l27.492,0
c2.034,0,3.689,1.655,3.689,3.689v0.459l-2.68,0v-0.459c0-0.557-0.453-1.009-1.009-1.009H18.089c-0.557,0-1.009,0.453-1.009,1.009
v33.346c0,0.557,0.453,1.009,1.009,1.009H45.58c0.556,0,1.009-0.453,1.009-1.009v-0.459h0.001v-7.247h2.68v7.706
c0,2.034-1.655,3.689-3.689,3.689H18.089z M37.842,49.247c-0.268,0-0.527-0.079-0.748-0.229c-0.445-0.3-0.667-0.835-0.567-1.363
l1.23-6.429c0.01-0.053,0.028-0.097,0.044-0.13c0.029-0.107,0.068-0.219,0.138-0.332l10.74-16.986c0.006-0.01,0.012-0.02,0.019-0.03
c0.002-0.003,0.012-0.02,0.012-0.02l1.579-2.28c0.139-0.19,0.9-1.136,2.271-1.136c0.468,0,0.942,0.115,1.408,0.341
c1.349,0.656,2.557,1.573,2.69,1.676c0.112,0.087,0.205,0.185,0.28,0.293c0.121,0.172,1.179,1.75,0.345,3.121
c-0.345,0.566-1.289,1.952-1.574,2.368L44.392,45.148c-0.064,0.096-0.14,0.153-0.181,0.184l-0.003,0.002
c-0.003,0.003-0.006,0.007-0.009,0.011c-0.037,0.046-0.099,0.124-0.199,0.188l-5.434,3.501
C38.348,49.173,38.098,49.247,37.842,49.247z M39.746,45.083l1.124-0.724L40,43.754L39.746,45.083z M42.919,42.52l9.642-14.516
l-2.357-1.63L40.89,41.107L42.919,42.52z M54.051,25.778c0.397-0.588,0.682-1.02,0.854-1.29c-0.018-0.051-0.044-0.115-0.077-0.181
c-0.442-0.319-1.225-0.852-2.032-1.244c-0.063-0.03-0.122-0.045-0.18-0.045c-0.089,0-0.161,0.036-0.199,0.059l-0.736,1.063
L54.051,25.778z M19.812,43.954c-0.739,0-1.34-0.601-1.34-1.34c0-0.739,0.601-1.34,1.34-1.34h9.492c0.739,0,1.34,0.601,1.34,1.34
c0,0.739-0.601,1.34-1.34,1.34H19.812z M19.812,35.15c-0.739,0-1.34-0.601-1.34-1.34c0-0.739,0.601-1.34,1.34-1.34l15.777,0
c0.739,0,1.34,0.601,1.34,1.34c0,0.739-0.601,1.34-1.34,1.34H19.812z M19.812,26.403c-0.739,0-1.34-0.601-1.34-1.34
c0-0.739,0.601-1.34,1.34-1.34h22.063c0.739,0,1.34,0.601,1.34,1.34c0,0.739-0.601,1.34-1.34,1.34H19.812z"
/>
<g>
<line
class=
"st0"
x1=
"12.502"
y1=
"59.445"
x2=
"59.268"
y2=
"12.554"
/>
<circle
class=
"st1"
cx=
"36"
cy=
"36"
r=
"33.84"
/>
</g>
</svg>
src/AutoPilotPlugins/PX4/Images/no-logging.svg
0 → 100644
View file @
c6e7d15d
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
version=
"1.1"
id=
"Layer_1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
x=
"0px"
y=
"0px"
viewBox=
"0 0 72 72"
style=
"enable-background:new 0 0 72 72;"
xml:space=
"preserve"
>
<style
type=
"text/css"
>
.st0{fill:#FFFFFF;}
.st1{fill:none;stroke:#A10000;stroke-width:4;stroke-linecap:round;stroke-miterlimit:10;}
.st2{fill:none;stroke:#A10000;stroke-width:4;stroke-miterlimit:10;}
</style>
<path
class=
"st0"
d=
"M18.089,56.362c-2.034,0-3.689-1.655-3.689-3.689V19.327c0-2.034,1.655-3.689,3.689-3.689l27.492,0
c2.034,0,3.689,1.655,3.689,3.689v0.459l-2.68,0v-0.459c0-0.557-0.453-1.009-1.009-1.009H18.089c-0.557,0-1.009,0.453-1.009,1.009
v33.346c0,0.557,0.453,1.009,1.009,1.009H45.58c0.556,0,1.009-0.453,1.009-1.009v-0.459h0.001v-7.247h2.68v7.706
c0,2.034-1.655,3.689-3.689,3.689H18.089z M37.842,49.247c-0.268,0-0.527-0.079-0.748-0.229c-0.445-0.3-0.667-0.835-0.567-1.363
l1.23-6.429c0.01-0.053,0.028-0.097,0.044-0.13c0.029-0.107,0.068-0.219,0.138-0.332l10.74-16.986c0.006-0.01,0.012-0.02,0.019-0.03
c0.002-0.003,0.012-0.02,0.012-0.02l1.579-2.28c0.139-0.19,0.9-1.136,2.271-1.136c0.468,0,0.942,0.115,1.408,0.341
c1.349,0.656,2.557,1.573,2.69,1.676c0.112,0.087,0.205,0.185,0.28,0.293c0.121,0.172,1.179,1.75,0.345,3.121
c-0.345,0.566-1.289,1.952-1.574,2.368L44.392,45.148c-0.064,0.096-0.14,0.153-0.181,0.184l-0.003,0.002
c-0.003,0.003-0.006,0.007-0.009,0.011c-0.037,0.046-0.099,0.124-0.199,0.188l-5.434,3.501
C38.348,49.173,38.098,49.247,37.842,49.247z M39.746,45.083l1.124-0.724L40,43.754L39.746,45.083z M42.919,42.52l9.642-14.516
l-2.357-1.63L40.89,41.107L42.919,42.52z M54.051,25.778c0.397-0.588,0.682-1.02,0.854-1.29c-0.018-0.051-0.044-0.115-0.077-0.181
c-0.442-0.319-1.225-0.852-2.032-1.244c-0.063-0.03-0.122-0.045-0.18-0.045c-0.089,0-0.161,0.036-0.199,0.059l-0.736,1.063
L54.051,25.778z M19.812,43.954c-0.739,0-1.34-0.601-1.34-1.34c0-0.739,0.601-1.34,1.34-1.34h9.492c0.739,0,1.34,0.601,1.34,1.34
c0,0.739-0.601,1.34-1.34,1.34H19.812z M19.812,35.15c-0.739,0-1.34-0.601-1.34-1.34c0-0.739,0.601-1.34,1.34-1.34l15.777,0
c0.739,0,1.34,0.601,1.34,1.34c0,0.739-0.601,1.34-1.34,1.34H19.812z M19.812,26.403c-0.739,0-1.34-0.601-1.34-1.34
c0-0.739,0.601-1.34,1.34-1.34h22.063c0.739,0,1.34,0.601,1.34,1.34c0,0.739-0.601,1.34-1.34,1.34H19.812z"
/>
<g>
<line
class=
"st1"
x1=
"12.502"
y1=
"59.445"
x2=
"59.268"
y2=
"12.554"
/>
<circle
class=
"st2"
cx=
"36"
cy=
"36"
r=
"33.84"
/>
</g>
</svg>
src/AutoPilotPlugins/PX4/SafetyComponent.qml
View file @
c6e7d15d
...
...
@@ -43,6 +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
_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
"
)
...
...
@@ -98,7 +99,6 @@ SetupPage {
}
Rectangle
{
id
:
otherLastRect
x
:
landModeGrid
.
x
+
outerGrid
.
x
-
_margins
y
:
landModeGrid
.
y
+
outerGrid
.
y
-
_margins
width
:
landModeGrid
.
width
+
(
_margins
*
2
)
...
...
@@ -106,6 +106,15 @@ SetupPage {
color
:
qgcPal
.
windowShade
}
Rectangle
{
id
:
otherLastRect
x
:
loggingGrid
.
x
+
outerGrid
.
x
-
_margins
y
:
loggingGrid
.
y
+
outerGrid
.
y
-
_margins
width
:
loggingGrid
.
width
+
(
_margins
*
2
)
height
:
loggingGrid
.
height
+
(
_margins
*
2
)
color
:
qgcPal
.
windowShade
}
Rectangle
{
id
:
lastRect
x
:
hitlGrid
.
x
+
outerGrid
.
x
-
_margins
...
...
@@ -486,6 +495,48 @@ SetupPage {
}
}
Item
{
width
:
1
;
height
:
_margins
;
Layout.columnSpan
:
3
}
QGCLabel
{
text
:
qsTr
(
"
Vehicle Logging
"
)
Layout.columnSpan
:
3
}
Item
{
width
:
1
;
height
:
_margins
;
Layout.columnSpan
:
3
}
Item
{
width
:
_margins
;
height
:
1
}
GridLayout
{
id
:
loggingGrid
columns
:
4
Item
{
Layout.fillWidth
:
true
}
Image
{
mipmap
:
true
fillMode
:
Image
.
PreserveAspectFit
source
:
qgcPal
.
globalTheme
===
qgcPal
.
Light
?
"
/qmlimages/no-logging-light.svg
"
:
"
/qmlimages/no-logging.svg
"
Layout.maximumWidth
:
_imageWidth
Layout.maximumHeight
:
_imageHeight
width
:
_imageWidth
height
:
_imageHeight
}
QGCCheckBox
{
text
:
qsTr
(
"
Disable vehicle logging
"
)
checkedState
:
_disableLogging
?
(
_disableLogging
.
value
<
0
?
Qt
.
Checked
:
Qt
.
Unchecked
)
:
Qt
.
Unchecked
Layout.minimumWidth
:
_editFieldWidth
Layout.alignment
:
Qt
.
AlignVCenter
onClicked
:
{
if
(
_disableLogging
)
{
_disableLogging
.
value
=
checked
?
-
1
:
0
}
}
}
Item
{
Layout.fillWidth
:
true
}
}
Item
{
width
:
1
;
height
:
_margins
;
Layout.columnSpan
:
3
;
visible
:
_hitlAvailable
}
QGCLabel
{
...
...
@@ -504,10 +555,10 @@ SetupPage {
visible
:
_hitlAvailable
Image
{
mipmap
:
true
fillMode
:
Image
.
PreserveAspectFit
source
:
qgcPal
.
globalTheme
===
qgcPal
.
Light
?
"
/qmlimages/VehicleSummaryIcon.png
"
:
"
/qmlimages/VehicleSummaryIcon.png
"
Layout.rowSpan
:
3
mipmap
:
true
fillMode
:
Image
.
PreserveAspectFit
source
:
qgcPal
.
globalTheme
===
qgcPal
.
Light
?
"
/qmlimages/VehicleSummaryIcon.png
"
:
"
/qmlimages/VehicleSummaryIcon.png
"
Layout.rowSpan
:
3
Layout.maximumWidth
:
_imageWidth
Layout.maximumHeight
:
_imageHeight
width
:
_imageWidth
...
...
@@ -524,6 +575,7 @@ SetupPage {
Layout.minimumWidth
:
_editFieldWidth
}
}
}
}
}
...
...
src/Settings/App.SettingsGroup.json
View file @
c6e7d15d
...
...
@@ -235,5 +235,12 @@
"enumStrings"
:
"System,English,български (Bulgarian),Deutsche (German),Français (French),Italiano (Italian),한국어 (Korean),Pусский (Russian),Türk (Turkish),中文 (Chinese)"
,
"enumValues"
:
"0,1,2,3,4,5,6,7,8,9"
,
"defaultValue"
:
0
},
{
"name"
:
"disableLocalLogging"
,
"shortDescription"
:
"Disable all logging"
,
"longDescription"
:
"If this option is enabled nothing will be stored to disk."
,
"type"
:
"bool"
,
"defaultValue"
:
false
}
]
src/Settings/AppSettings.cc
View file @
c6e7d15d
...
...
@@ -10,6 +10,7 @@
#include "AppSettings.h"
#include "QGCPalette.h"
#include "QGCApplication.h"
#include "ParameterManager.h"
#include <QQmlEngine>
#include <QtQml>
...
...
@@ -61,7 +62,7 @@ DECLARE_SETTINGGROUP(App, "")
connect
(
savePathFact
,
&
Fact
::
rawValueChanged
,
this
,
&
AppSettings
::
_checkSavePathDirectories
);
_checkSavePathDirectories
();
//--
Same for language
//--
Keep track of language changes
SettingsFact
*
languageFact
=
qobject_cast
<
SettingsFact
*>
(
language
());
connect
(
languageFact
,
&
Fact
::
rawValueChanged
,
this
,
&
AppSettings
::
_languageChanged
);
}
...
...
@@ -93,6 +94,7 @@ DECLARE_SETTINGSFACT(AppSettings, enableTaisync)
DECLARE_SETTINGSFACT
(
AppSettings
,
enableTaisyncVideo
)
DECLARE_SETTINGSFACT
(
AppSettings
,
enableMicrohard
)
DECLARE_SETTINGSFACT
(
AppSettings
,
language
)
DECLARE_SETTINGSFACT
(
AppSettings
,
disableLocalLogging
)
DECLARE_SETTINGSFACT_NO_FUNC
(
AppSettings
,
indoorPalette
)
{
...
...
src/Settings/AppSettings.h
View file @
c6e7d15d
...
...
@@ -48,6 +48,7 @@ public:
DEFINE_SETTINGFACT
(
enableTaisyncVideo
)
DEFINE_SETTINGFACT
(
enableMicrohard
)
DEFINE_SETTINGFACT
(
language
)
DEFINE_SETTINGFACT
(
disableLocalLogging
)
// 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/Vehicle/Vehicle.h
View file @
c6e7d15d
...
...
@@ -912,10 +912,10 @@ public:
QString
brandImageIndoor
()
const
;
QString
brandImageOutdoor
()
const
;
QStringList
unhealthySensors
()
const
;
int
sensorsPresentBits
()
const
{
return
_onboardControlSensorsPresent
;
}
int
sensorsEnabledBits
()
const
{
return
_onboardControlSensorsEnabled
;
}
int
sensorsHealthBits
()
const
{
return
_onboardControlSensorsHealth
;
}
int
sensorsUnhealthyBits
()
const
{
return
_onboardControlSensorsUnhealthy
;
}
int
sensorsPresentBits
()
const
{
return
static_cast
<
int
>
(
_onboardControlSensorsPresent
)
;
}
int
sensorsEnabledBits
()
const
{
return
static_cast
<
int
>
(
_onboardControlSensorsEnabled
)
;
}
int
sensorsHealthBits
()
const
{
return
static_cast
<
int
>
(
_onboardControlSensorsHealth
)
;
}
int
sensorsUnhealthyBits
()
const
{
return
static_cast
<
int
>
(
_onboardControlSensorsUnhealthy
)
;
}
QString
missionFlightMode
()
const
;
QString
pauseFlightMode
()
const
;
QString
rtlFlightMode
()
const
;
...
...
src/comm/MAVLinkProtocol.cc
View file @
c6e7d15d
...
...
@@ -404,9 +404,13 @@ void MAVLinkProtocol::_startLogging(void)
if
(
qgcApp
()
->
runningUnitTests
())
{
return
;
}
AppSettings
*
appSettings
=
_app
->
toolbox
()
->
settingsManager
()
->
appSettings
();
if
(
appSettings
->
disableLocalLogging
()
->
rawValue
().
toBool
())
{
return
;
}
#ifdef __mobile__
//-- Mobile build don't write to /tmp unless told to do so
if
(
!
_app
->
toolbox
()
->
settingsManager
()
->
appSettings
()
->
telemetrySave
()
->
rawValue
().
toBool
())
{
if
(
!
appSettings
->
telemetrySave
()
->
rawValue
().
toBool
())
{
return
;
}
#endif
...
...
@@ -435,7 +439,8 @@ void MAVLinkProtocol::_stopLogging(void)
if
(
_tempLogFile
.
isOpen
())
{
if
(
_closeLogFile
())
{
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
()
->
disableLocalLogging
()
->
rawValue
().
toBool
())
{
emit
saveTelemetryLog
(
_tempLogFile
.
fileName
());
}
else
{
QFile
::
remove
(
_tempLogFile
.
fileName
());
...
...
src/ui/preferences/GeneralSettings.qml
View file @
c6e7d15d
...
...
@@ -44,6 +44,7 @@ QGCView {
property
Fact
_followTarget
:
QGroundControl
.
settingsManager
.
appSettings
.
followTarget
property
real
_panelWidth
:
_qgcView
.
width
*
_internalWidthRatio
property
real
_margins
:
ScreenTools
.
defaultFontPixelWidth
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
property
string
_videoSource
:
QGroundControl
.
settingsManager
.
videoSettings
.
videoSource
.
value
property
bool
_isGst
:
QGroundControl
.
videoManager
.
isGStreamer
...
...
@@ -262,11 +263,20 @@ 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
}
...
...
@@ -274,7 +284,7 @@ QGCView {
text
:
qsTr
(
"
Save telemetry log even if vehicle was not armed
"
)
fact
:
_telemetrySaveNotArmed
visible
:
_telemetrySaveNotArmed
.
visible
enabled
:
promptSaveLog
.
checked
enabled
:
promptSaveLog
.
checked
&&
!
disableLogging
.
checked
property
Fact
_telemetrySaveNotArmed
:
QGroundControl
.
settingsManager
.
appSettings
.
telemetrySaveNotArmed
}
...
...
src/ui/preferences/MavlinkSettings.qml
View file @
c6e7d15d
This diff is collapsed.
Click to expand it.
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