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
a59f2282
Unverified
Commit
a59f2282
authored
Apr 03, 2018
by
Gus Grubba
Committed by
GitHub
Apr 03, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6292 from mavlink/logdenied
Don't try to start logging if it's been denied.
parents
3fae6644
be9b4d3d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
MAVLinkLogManager.cc
src/Vehicle/MAVLinkLogManager.cc
+10
-2
MAVLinkLogManager.h
src/Vehicle/MAVLinkLogManager.h
+2
-1
No files found.
src/Vehicle/MAVLinkLogManager.cc
View file @
a59f2282
...
...
@@ -309,6 +309,7 @@ MAVLinkLogManager::MAVLinkLogManager(QGCApplication* app, QGCToolbox* toolbox)
,
_deleteAfterUpload
(
false
)
,
_windSpeed
(
-
1
)
,
_publicLog
(
false
)
,
_logginDenied
(
false
)
{
//-- Get saved settings
QSettings
settings
;
...
...
@@ -613,7 +614,7 @@ MAVLinkLogManager::cancelUpload()
void
MAVLinkLogManager
::
startLogging
()
{
if
(
_vehicle
&&
_vehicle
->
px4Firmware
())
{
if
(
_vehicle
&&
_vehicle
->
px4Firmware
()
&&
!
_logginDenied
)
{
if
(
_createNewLog
())
{
_vehicle
->
startMavlinkLog
();
_logRunning
=
true
;
...
...
@@ -847,6 +848,8 @@ MAVLinkLogManager::_activeVehicleChanged(Vehicle* vehicle)
// Connect new system
if
(
vehicle
&&
vehicle
->
px4Firmware
())
{
_vehicle
=
vehicle
;
//-- Reset logging denied flag as well
_logginDenied
=
false
;
connect
(
_vehicle
,
&
Vehicle
::
armedChanged
,
this
,
&
MAVLinkLogManager
::
_armedChanged
);
connect
(
_vehicle
,
&
Vehicle
::
mavlinkLogData
,
this
,
&
MAVLinkLogManager
::
_mavlinkLogData
);
connect
(
_vehicle
,
&
Vehicle
::
mavCommandResult
,
this
,
&
MAVLinkLogManager
::
_mavCommandResult
);
...
...
@@ -888,7 +891,12 @@ MAVLinkLogManager::_mavCommandResult(int vehicleId, int component, int command,
qCWarning
(
MAVLinkLogManagerLog
)
<<
"Stop MAVLink log command failed."
;
}
else
{
//-- Could not start logging for some reason.
qCWarning
(
MAVLinkLogManagerLog
)
<<
"Start MAVLink log command failed."
;
if
(
result
==
MAV_RESULT_DENIED
)
{
_logginDenied
=
true
;
qCWarning
(
MAVLinkLogManagerLog
)
<<
"Start MAVLink log command denied."
;
}
else
{
qCWarning
(
MAVLinkLogManagerLog
)
<<
"Start MAVLink log command failed."
;
}
_discardLog
();
}
}
...
...
src/Vehicle/MAVLinkLogManager.h
View file @
a59f2282
...
...
@@ -140,7 +140,7 @@ public:
bool
enableAutoStart
()
{
return
_enableAutoStart
;
}
bool
uploading
();
bool
logRunning
()
{
return
_logRunning
;
}
bool
canStartLog
()
{
return
_vehicle
!=
NULL
;
}
bool
canStartLog
()
{
return
_vehicle
!=
NULL
&&
!
_logginDenied
;
}
bool
deleteAfterUpload
()
{
return
_deleteAfterUpload
;
}
bool
publicLog
()
{
return
_publicLog
;
}
int
windSpeed
()
{
return
_windSpeed
;
}
...
...
@@ -226,6 +226,7 @@ private:
QString
_rating
;
bool
_publicLog
;
QString
_ulogExtension
;
bool
_logginDenied
;
};
...
...
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