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
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 @@
...
@@ -186,6 +186,8 @@
<file alias="AlertAircraft.svg">src/FlightMap/Images/AlertAircraft.svg</file>
<file alias="AlertAircraft.svg">src/FlightMap/Images/AlertAircraft.svg</file>
<file alias="AwarenessAircraft.svg">src/FlightMap/Images/AwarenessAircraft.svg</file>
<file alias="AwarenessAircraft.svg">src/FlightMap/Images/AwarenessAircraft.svg</file>
<file alias="check.svg">resources/check.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>
<qresource prefix="/res">
<qresource prefix="/res">
<file alias="action.svg">resources/action.svg</file>
<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 {
...
@@ -43,6 +43,7 @@ SetupPage {
property
real
_imageWidth
:
ScreenTools
.
defaultFontPixelWidth
*
15
property
real
_imageWidth
:
ScreenTools
.
defaultFontPixelWidth
*
15
property
real
_imageHeight
:
ScreenTools
.
defaultFontPixelHeight
*
3
property
real
_imageHeight
:
ScreenTools
.
defaultFontPixelHeight
*
3
property
Fact
_disableLogging
:
controller
.
getParameterFact
(
-
1
,
"
SDLOG_MODE
"
)
property
Fact
_fenceAction
:
controller
.
getParameterFact
(
-
1
,
"
GF_ACTION
"
)
property
Fact
_fenceAction
:
controller
.
getParameterFact
(
-
1
,
"
GF_ACTION
"
)
property
Fact
_fenceRadius
:
controller
.
getParameterFact
(
-
1
,
"
GF_MAX_HOR_DIST
"
)
property
Fact
_fenceRadius
:
controller
.
getParameterFact
(
-
1
,
"
GF_MAX_HOR_DIST
"
)
property
Fact
_fenceAlt
:
controller
.
getParameterFact
(
-
1
,
"
GF_MAX_VER_DIST
"
)
property
Fact
_fenceAlt
:
controller
.
getParameterFact
(
-
1
,
"
GF_MAX_VER_DIST
"
)
...
@@ -98,7 +99,6 @@ SetupPage {
...
@@ -98,7 +99,6 @@ SetupPage {
}
}
Rectangle
{
Rectangle
{
id
:
otherLastRect
x
:
landModeGrid
.
x
+
outerGrid
.
x
-
_margins
x
:
landModeGrid
.
x
+
outerGrid
.
x
-
_margins
y
:
landModeGrid
.
y
+
outerGrid
.
y
-
_margins
y
:
landModeGrid
.
y
+
outerGrid
.
y
-
_margins
width
:
landModeGrid
.
width
+
(
_margins
*
2
)
width
:
landModeGrid
.
width
+
(
_margins
*
2
)
...
@@ -106,6 +106,15 @@ SetupPage {
...
@@ -106,6 +106,15 @@ SetupPage {
color
:
qgcPal
.
windowShade
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
{
Rectangle
{
id
:
lastRect
id
:
lastRect
x
:
hitlGrid
.
x
+
outerGrid
.
x
-
_margins
x
:
hitlGrid
.
x
+
outerGrid
.
x
-
_margins
...
@@ -486,6 +495,48 @@ SetupPage {
...
@@ -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
}
Item
{
width
:
1
;
height
:
_margins
;
Layout.columnSpan
:
3
;
visible
:
_hitlAvailable
}
QGCLabel
{
QGCLabel
{
...
@@ -504,10 +555,10 @@ SetupPage {
...
@@ -504,10 +555,10 @@ SetupPage {
visible
:
_hitlAvailable
visible
:
_hitlAvailable
Image
{
Image
{
mipmap
:
true
mipmap
:
true
fillMode
:
Image
.
PreserveAspectFit
fillMode
:
Image
.
PreserveAspectFit
source
:
qgcPal
.
globalTheme
===
qgcPal
.
Light
?
"
/qmlimages/VehicleSummaryIcon.png
"
:
"
/qmlimages/VehicleSummaryIcon.png
"
source
:
qgcPal
.
globalTheme
===
qgcPal
.
Light
?
"
/qmlimages/VehicleSummaryIcon.png
"
:
"
/qmlimages/VehicleSummaryIcon.png
"
Layout.rowSpan
:
3
Layout.rowSpan
:
3
Layout.maximumWidth
:
_imageWidth
Layout.maximumWidth
:
_imageWidth
Layout.maximumHeight
:
_imageHeight
Layout.maximumHeight
:
_imageHeight
width
:
_imageWidth
width
:
_imageWidth
...
@@ -524,6 +575,7 @@ SetupPage {
...
@@ -524,6 +575,7 @@ SetupPage {
Layout.minimumWidth
:
_editFieldWidth
Layout.minimumWidth
:
_editFieldWidth
}
}
}
}
}
}
}
}
}
}
...
...
src/Settings/App.SettingsGroup.json
View file @
c6e7d15d
...
@@ -235,5 +235,12 @@
...
@@ -235,5 +235,12 @@
"enumStrings"
:
"System,English,български (Bulgarian),Deutsche (German),Français (French),Italiano (Italian),한국어 (Korean),Pусский (Russian),Türk (Turkish),中文 (Chinese)"
,
"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"
,
"enumValues"
:
"0,1,2,3,4,5,6,7,8,9"
,
"defaultValue"
:
0
"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 @@
...
@@ -10,6 +10,7 @@
#include "AppSettings.h"
#include "AppSettings.h"
#include "QGCPalette.h"
#include "QGCPalette.h"
#include "QGCApplication.h"
#include "QGCApplication.h"
#include "ParameterManager.h"
#include <QQmlEngine>
#include <QQmlEngine>
#include <QtQml>
#include <QtQml>
...
@@ -61,7 +62,7 @@ DECLARE_SETTINGGROUP(App, "")
...
@@ -61,7 +62,7 @@ DECLARE_SETTINGGROUP(App, "")
connect
(
savePathFact
,
&
Fact
::
rawValueChanged
,
this
,
&
AppSettings
::
_checkSavePathDirectories
);
connect
(
savePathFact
,
&
Fact
::
rawValueChanged
,
this
,
&
AppSettings
::
_checkSavePathDirectories
);
_checkSavePathDirectories
();
_checkSavePathDirectories
();
//--
Same for language
//--
Keep track of language changes
SettingsFact
*
languageFact
=
qobject_cast
<
SettingsFact
*>
(
language
());
SettingsFact
*
languageFact
=
qobject_cast
<
SettingsFact
*>
(
language
());
connect
(
languageFact
,
&
Fact
::
rawValueChanged
,
this
,
&
AppSettings
::
_languageChanged
);
connect
(
languageFact
,
&
Fact
::
rawValueChanged
,
this
,
&
AppSettings
::
_languageChanged
);
}
}
...
@@ -93,6 +94,7 @@ DECLARE_SETTINGSFACT(AppSettings, enableTaisync)
...
@@ -93,6 +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
,
disableLocalLogging
)
DECLARE_SETTINGSFACT_NO_FUNC
(
AppSettings
,
indoorPalette
)
DECLARE_SETTINGSFACT_NO_FUNC
(
AppSettings
,
indoorPalette
)
{
{
...
...
src/Settings/AppSettings.h
View file @
c6e7d15d
...
@@ -48,6 +48,7 @@ public:
...
@@ -48,6 +48,7 @@ public:
DEFINE_SETTINGFACT
(
enableTaisyncVideo
)
DEFINE_SETTINGFACT
(
enableTaisyncVideo
)
DEFINE_SETTINGFACT
(
enableMicrohard
)
DEFINE_SETTINGFACT
(
enableMicrohard
)
DEFINE_SETTINGFACT
(
language
)
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
// 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/Vehicle/Vehicle.h
View file @
c6e7d15d
...
@@ -912,10 +912,10 @@ public:
...
@@ -912,10 +912,10 @@ public:
QString
brandImageIndoor
()
const
;
QString
brandImageIndoor
()
const
;
QString
brandImageOutdoor
()
const
;
QString
brandImageOutdoor
()
const
;
QStringList
unhealthySensors
()
const
;
QStringList
unhealthySensors
()
const
;
int
sensorsPresentBits
()
const
{
return
_onboardControlSensorsPresent
;
}
int
sensorsPresentBits
()
const
{
return
static_cast
<
int
>
(
_onboardControlSensorsPresent
)
;
}
int
sensorsEnabledBits
()
const
{
return
_onboardControlSensorsEnabled
;
}
int
sensorsEnabledBits
()
const
{
return
static_cast
<
int
>
(
_onboardControlSensorsEnabled
)
;
}
int
sensorsHealthBits
()
const
{
return
_onboardControlSensorsHealth
;
}
int
sensorsHealthBits
()
const
{
return
static_cast
<
int
>
(
_onboardControlSensorsHealth
)
;
}
int
sensorsUnhealthyBits
()
const
{
return
_onboardControlSensorsUnhealthy
;
}
int
sensorsUnhealthyBits
()
const
{
return
static_cast
<
int
>
(
_onboardControlSensorsUnhealthy
)
;
}
QString
missionFlightMode
()
const
;
QString
missionFlightMode
()
const
;
QString
pauseFlightMode
()
const
;
QString
pauseFlightMode
()
const
;
QString
rtlFlightMode
()
const
;
QString
rtlFlightMode
()
const
;
...
...
src/comm/MAVLinkProtocol.cc
View file @
c6e7d15d
...
@@ -404,9 +404,13 @@ void MAVLinkProtocol::_startLogging(void)
...
@@ -404,9 +404,13 @@ void MAVLinkProtocol::_startLogging(void)
if
(
qgcApp
()
->
runningUnitTests
())
{
if
(
qgcApp
()
->
runningUnitTests
())
{
return
;
return
;
}
}
AppSettings
*
appSettings
=
_app
->
toolbox
()
->
settingsManager
()
->
appSettings
();
if
(
appSettings
->
disableLocalLogging
()
->
rawValue
().
toBool
())
{
return
;
}
#ifdef __mobile__
#ifdef __mobile__
//-- Mobile build don't write to /tmp unless told to do so
//-- 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
;
return
;
}
}
#endif
#endif
...
@@ -435,7 +439,8 @@ void MAVLinkProtocol::_stopLogging(void)
...
@@ -435,7 +439,8 @@ void MAVLinkProtocol::_stopLogging(void)
if
(
_tempLogFile
.
isOpen
())
{
if
(
_tempLogFile
.
isOpen
())
{
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
()
->
disableLocalLogging
()
->
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 @
c6e7d15d
...
@@ -44,6 +44,7 @@ QGCView {
...
@@ -44,6 +44,7 @@ QGCView {
property
Fact
_followTarget
:
QGroundControl
.
settingsManager
.
appSettings
.
followTarget
property
Fact
_followTarget
:
QGroundControl
.
settingsManager
.
appSettings
.
followTarget
property
real
_panelWidth
:
_qgcView
.
width
*
_internalWidthRatio
property
real
_panelWidth
:
_qgcView
.
width
*
_internalWidthRatio
property
real
_margins
:
ScreenTools
.
defaultFontPixelWidth
property
real
_margins
:
ScreenTools
.
defaultFontPixelWidth
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
property
string
_videoSource
:
QGroundControl
.
settingsManager
.
videoSettings
.
videoSource
.
value
property
string
_videoSource
:
QGroundControl
.
settingsManager
.
videoSettings
.
videoSource
.
value
property
bool
_isGst
:
QGroundControl
.
videoManager
.
isGStreamer
property
bool
_isGst
:
QGroundControl
.
videoManager
.
isGStreamer
...
@@ -262,11 +263,20 @@ QGCView {
...
@@ -262,11 +263,20 @@ QGCView {
property
Fact
_audioMuted
:
QGroundControl
.
settingsManager
.
appSettings
.
audioMuted
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
{
FactCheckBox
{
id
:
promptSaveLog
id
:
promptSaveLog
text
:
qsTr
(
"
Save telemetry log after each flight
"
)
text
:
qsTr
(
"
Save telemetry log after each flight
"
)
fact
:
_telemetrySave
fact
:
_telemetrySave
visible
:
_telemetrySave
.
visible
visible
:
_telemetrySave
.
visible
enabled
:
!
disableLogging
.
checked
property
Fact
_telemetrySave
:
QGroundControl
.
settingsManager
.
appSettings
.
telemetrySave
property
Fact
_telemetrySave
:
QGroundControl
.
settingsManager
.
appSettings
.
telemetrySave
}
}
...
@@ -274,7 +284,7 @@ QGCView {
...
@@ -274,7 +284,7 @@ QGCView {
text
:
qsTr
(
"
Save telemetry log even if vehicle was not armed
"
)
text
:
qsTr
(
"
Save telemetry log even if vehicle was not armed
"
)
fact
:
_telemetrySaveNotArmed
fact
:
_telemetrySaveNotArmed
visible
:
_telemetrySaveNotArmed
.
visible
visible
:
_telemetrySaveNotArmed
.
visible
enabled
:
promptSaveLog
.
checked
enabled
:
promptSaveLog
.
checked
&&
!
disableLogging
.
checked
property
Fact
_telemetrySaveNotArmed
:
QGroundControl
.
settingsManager
.
appSettings
.
telemetrySaveNotArmed
property
Fact
_telemetrySaveNotArmed
:
QGroundControl
.
settingsManager
.
appSettings
.
telemetrySaveNotArmed
}
}
...
...
src/ui/preferences/MavlinkSettings.qml
View file @
c6e7d15d
...
@@ -33,8 +33,10 @@ Rectangle {
...
@@ -33,8 +33,10 @@ Rectangle {
property
real
_columnSpacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.25
property
real
_columnSpacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.25
property
bool
_uploadedSelected
:
false
property
bool
_uploadedSelected
:
false
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
property
var
_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
_disableLoggingFact
:
QGroundControl
.
settingsManager
.
appSettings
.
disableLocalLogging
property
bool
_disableLogging
:
_disableLogging
?
_disableLogging
.
rawValue
:
false
QGCPalette
{
id
:
qgcPal
}
QGCPalette
{
id
:
qgcPal
}
...
@@ -196,49 +198,49 @@ Rectangle {
...
@@ -196,49 +198,49 @@ Rectangle {
QGCLabel
{
text
:
qsTr
(
"
Raw Sensors
"
)
}
QGCLabel
{
text
:
qsTr
(
"
Raw Sensors
"
)
}
FactComboBox
{
FactComboBox
{
fact
:
QGroundControl
.
settingsManager
.
apmMavlinkStreamRateSettings
.
streamRateRawSensors
fact
:
QGroundControl
.
settingsManager
.
apmMavlinkStreamRateSettings
?
QGroundControl
.
settingsManager
.
apmMavlinkStreamRateSettings
.
streamRateRawSensors
:
null
indexModel
:
false
indexModel
:
false
Layout.preferredWidth
:
_valueWidth
Layout.preferredWidth
:
_valueWidth
}
}
QGCLabel
{
text
:
qsTr
(
"
Extended Status
"
)
}
QGCLabel
{
text
:
qsTr
(
"
Extended Status
"
)
}
FactComboBox
{
FactComboBox
{
fact
:
QGroundControl
.
settingsManager
.
apmMavlinkStreamRateSettings
.
streamRateExtendedStatus
fact
:
QGroundControl
.
settingsManager
.
apmMavlinkStreamRateSettings
?
QGroundControl
.
settingsManager
.
apmMavlinkStreamRateSettings
.
streamRateExtendedStatus
:
null
indexModel
:
false
indexModel
:
false
Layout.preferredWidth
:
_valueWidth
Layout.preferredWidth
:
_valueWidth
}
}
QGCLabel
{
text
:
qsTr
(
"
RC Channel
"
)
}
QGCLabel
{
text
:
qsTr
(
"
RC Channel
"
)
}
FactComboBox
{
FactComboBox
{
fact
:
QGroundControl
.
settingsManager
.
apmMavlinkStreamRateSettings
.
streamRateRCChannels
fact
:
QGroundControl
.
settingsManager
.
apmMavlinkStreamRateSettings
?
QGroundControl
.
settingsManager
.
apmMavlinkStreamRateSettings
.
streamRateRCChannels
:
null
indexModel
:
false
indexModel
:
false
Layout.preferredWidth
:
_valueWidth
Layout.preferredWidth
:
_valueWidth
}
}
QGCLabel
{
text
:
qsTr
(
"
Position
"
)
}
QGCLabel
{
text
:
qsTr
(
"
Position
"
)
}
FactComboBox
{
FactComboBox
{
fact
:
QGroundControl
.
settingsManager
.
apmMavlinkStreamRateSettings
.
streamRatePosition
fact
:
QGroundControl
.
settingsManager
.
apmMavlinkStreamRateSettings
?
QGroundControl
.
settingsManager
.
apmMavlinkStreamRateSettings
.
streamRatePosition
:
null
indexModel
:
false
indexModel
:
false
Layout.preferredWidth
:
_valueWidth
Layout.preferredWidth
:
_valueWidth
}
}
QGCLabel
{
text
:
qsTr
(
"
Extra 1
"
)
}
QGCLabel
{
text
:
qsTr
(
"
Extra 1
"
)
}
FactComboBox
{
FactComboBox
{
fact
:
QGroundControl
.
settingsManager
.
apmMavlinkStreamRateSettings
.
streamRateExtra1
fact
:
QGroundControl
.
settingsManager
.
apmMavlinkStreamRateSettings
?
QGroundControl
.
settingsManager
.
apmMavlinkStreamRateSettings
.
streamRateExtra1
:
null
indexModel
:
false
indexModel
:
false
Layout.preferredWidth
:
_valueWidth
Layout.preferredWidth
:
_valueWidth
}
}
QGCLabel
{
text
:
qsTr
(
"
Extra 2
"
)
}
QGCLabel
{
text
:
qsTr
(
"
Extra 2
"
)
}
FactComboBox
{
FactComboBox
{
fact
:
QGroundControl
.
settingsManager
.
apmMavlinkStreamRateSettings
.
streamRateExtra2
fact
:
QGroundControl
.
settingsManager
.
apmMavlinkStreamRateSettings
?
QGroundControl
.
settingsManager
.
apmMavlinkStreamRateSettings
.
streamRateExtra2
:
null
indexModel
:
false
indexModel
:
false
Layout.preferredWidth
:
_valueWidth
Layout.preferredWidth
:
_valueWidth
}
}
QGCLabel
{
text
:
qsTr
(
"
Extra 3
"
)
}
QGCLabel
{
text
:
qsTr
(
"
Extra 3
"
)
}
FactComboBox
{
FactComboBox
{
fact
:
QGroundControl
.
settingsManager
.
apmMavlinkStreamRateSettings
.
streamRateExtra3
fact
:
QGroundControl
.
settingsManager
.
apmMavlinkStreamRateSettings
?
QGroundControl
.
settingsManager
.
apmMavlinkStreamRateSettings
.
streamRateExtra3
:
null
indexModel
:
false
indexModel
:
false
Layout.preferredWidth
:
_valueWidth
Layout.preferredWidth
:
_valueWidth
}
}
...
@@ -370,14 +372,14 @@ Rectangle {
...
@@ -370,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
enabled
:
!
QGroundControl
.
mavlinkLogManager
.
logRunning
&&
QGroundControl
.
mavlinkLogManager
.
canStartLog
&&
!
_disableLogging
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
enabled
:
QGroundControl
.
mavlinkLogManager
.
logRunning
&&
!
_disableLogging
onClicked
:
QGroundControl
.
mavlinkLogManager
.
stopLogging
()
onClicked
:
QGroundControl
.
mavlinkLogManager
.
stopLogging
()
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
...
@@ -387,6 +389,7 @@ Rectangle {
...
@@ -387,6 +389,7 @@ Rectangle {
QGCCheckBox
{
QGCCheckBox
{
text
:
qsTr
(
"
Enable automatic logging
"
)
text
:
qsTr
(
"
Enable automatic logging
"
)
checked
:
QGroundControl
.
mavlinkLogManager
.
enableAutoStart
checked
:
QGroundControl
.
mavlinkLogManager
.
enableAutoStart
enabled
:
!
_disableLogging
onClicked
:
{
onClicked
:
{
QGroundControl
.
mavlinkLogManager
.
enableAutoStart
=
checked
QGroundControl
.
mavlinkLogManager
.
enableAutoStart
=
checked
}
}
...
@@ -428,9 +431,10 @@ Rectangle {
...
@@ -428,9 +431,10 @@ Rectangle {
text
:
qsTr
(
"
Email address for Log Upload:
"
)
text
:
qsTr
(
"
Email address for Log Upload:
"
)
}
}
QGCTextField
{
QGCTextField
{
id
:
emailField
id
:
emailField
text
:
QGroundControl
.
mavlinkLogManager
.
emailAddress
text
:
QGroundControl
.
mavlinkLogManager
.
emailAddress
width
:
_valueWidth
width
:
_valueWidth
enabled
:
!
_disableLogging
inputMethodHints
:
Qt
.
ImhNoAutoUppercase
|
Qt
.
ImhEmailCharactersOnly
inputMethodHints
:
Qt
.
ImhNoAutoUppercase
|
Qt
.
ImhEmailCharactersOnly
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.verticalCenter
:
parent
.
verticalCenter
onEditingFinished
:
{
onEditingFinished
:
{
...
@@ -448,9 +452,10 @@ Rectangle {
...
@@ -448,9 +452,10 @@ Rectangle {
text
:
qsTr
(
"
Default Description:
"
)
text
:
qsTr
(
"
Default Description:
"
)
}
}
QGCTextField
{
QGCTextField
{
id
:
descField
id
:
descField
text
:
QGroundControl
.
mavlinkLogManager
.
description
text
:
QGroundControl
.
mavlinkLogManager
.
description
width
:
_valueWidth
width
:
_valueWidth
enabled
:
!
_disableLogging
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.verticalCenter
:
parent
.
verticalCenter
onEditingFinished
:
{
onEditingFinished
:
{
saveItems
();
saveItems
();
...
@@ -467,9 +472,10 @@ Rectangle {
...
@@ -467,9 +472,10 @@ Rectangle {
text
:
qsTr
(
"
Default Upload URL
"
)
text
:
qsTr
(
"
Default Upload URL
"
)
}
}
QGCTextField
{
QGCTextField
{
id
:
urlField
id
:
urlField
text
:
QGroundControl
.
mavlinkLogManager
.
uploadURL
text
:
QGroundControl
.
mavlinkLogManager
.
uploadURL
width
:
_valueWidth
width
:
_valueWidth
enabled
:
!
_disableLogging
inputMethodHints
:
Qt
.
ImhNoAutoUppercase
|
Qt
.
ImhUrlCharactersOnly
inputMethodHints
:
Qt
.
ImhNoAutoUppercase
|
Qt
.
ImhUrlCharactersOnly
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.verticalCenter
:
parent
.
verticalCenter
onEditingFinished
:
{
onEditingFinished
:
{
...
@@ -487,9 +493,10 @@ Rectangle {
...
@@ -487,9 +493,10 @@ Rectangle {
text
:
qsTr
(
"
Video URL:
"
)
text
:
qsTr
(
"
Video URL:
"
)
}
}
QGCTextField
{
QGCTextField
{
id
:
videoUrlField
id
:
videoUrlField
text
:
QGroundControl
.
mavlinkLogManager
.
videoURL
text
:
QGroundControl
.
mavlinkLogManager
.
videoURL
width
:
_valueWidth
width
:
_valueWidth
enabled
:
!
_disableLogging
inputMethodHints
:
Qt
.
ImhNoAutoUppercase
|
Qt
.
ImhUrlCharactersOnly
inputMethodHints
:
Qt
.
ImhNoAutoUppercase
|
Qt
.
ImhUrlCharactersOnly
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
...
@@ -504,8 +511,9 @@ Rectangle {
...
@@ -504,8 +511,9 @@ Rectangle {
text
:
qsTr
(
"
Wind Speed:
"
)
text
:
qsTr
(
"
Wind Speed:
"
)
}
}
QGCComboBox
{
QGCComboBox
{
id
:
windCombo
id
:
windCombo
width
:
_valueWidth
width
:
_valueWidth
enabled
:
!
_disableLogging
model
:
ListModel
{
model
:
ListModel
{
id
:
windItems
id
:
windItems
ListElement
{
text
:
"
Please Select
"
;
value
:
-
1
}
ListElement
{
text
:
"
Please Select
"
;
value
:
-
1
}
...
@@ -540,8 +548,9 @@ Rectangle {
...
@@ -540,8 +548,9 @@ Rectangle {
text
:
qsTr
(
"
Flight Rating:
"
)
text
:
qsTr
(
"
Flight Rating:
"
)
}
}
QGCComboBox
{
QGCComboBox
{
id
:
ratingCombo
id
:
ratingCombo
width
:
_valueWidth
width
:
_valueWidth
enabled
:
!
_disableLogging
model
:
ListModel
{
model
:
ListModel
{
id
:
ratingItems
id
:
ratingItems
ListElement
{
text
:
"
Please Select
"
;
value
:
"
notset
"
}
ListElement
{
text
:
"
Please Select
"
;
value
:
"
notset
"
}
...
@@ -582,6 +591,7 @@ Rectangle {
...
@@ -582,6 +591,7 @@ Rectangle {
frameVisible
:
false
frameVisible
:
false
font.pointSize
:
ScreenTools
.
defaultFontPointSize
font.pointSize
:
ScreenTools
.
defaultFontPointSize
text
:
QGroundControl
.
mavlinkLogManager
.
feedback
text
:
QGroundControl
.
mavlinkLogManager
.
feedback
enabled
:
!
_disableLogging
style
:
TextAreaStyle
{
style
:
TextAreaStyle
{
textColor
:
qgcPal
.
windowShade
textColor
:
qgcPal
.
windowShade
backgroundColor
:
qgcPal
.
text
backgroundColor
:
qgcPal
.
text
...
@@ -593,6 +603,7 @@ Rectangle {
...
@@ -593,6 +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
:
!
_disableLogging
onClicked
:
{
onClicked
:
{
QGroundControl
.
mavlinkLogManager
.
publicLog
=
checked
QGroundControl
.
mavlinkLogManager
.
publicLog
=
checked
}
}
...
@@ -603,6 +614,7 @@ Rectangle {
...
@@ -603,6 +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
:
!
_disableLogging
onClicked
:
{
onClicked
:
{
saveItems
();
saveItems
();
if
(
checked
&&
QGroundControl
.
mavlinkLogManager
.
emailAddress
===
""
)
if
(
checked
&&
QGroundControl
.
mavlinkLogManager
.
emailAddress
===
""
)
...
@@ -614,7 +626,7 @@ Rectangle {
...
@@ -614,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
enabled
:
autoUploadCheck
.
checked
&&
!
_disableLogging
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