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
6e63553b
Commit
6e63553b
authored
Apr 09, 2017
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move logging to RTKGPSLog category
parent
32c4d85f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
14 deletions
+11
-14
GPSManager.cc
src/GPS/GPSManager.cc
+6
-11
GPSProvider.cc
src/GPS/GPSProvider.cc
+3
-3
QGCLoggingCategory.cc
src/QGCLoggingCategory.cc
+1
-0
QGCLoggingCategory.h
src/QGCLoggingCategory.h
+1
-0
No files found.
src/GPS/GPSManager.cc
View file @
6e63553b
...
...
@@ -9,7 +9,7 @@
#include "GPSManager.h"
#include
<QDebug>
#include
"QGCLoggingCategory.h"
GPSManager
::
GPSManager
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
)
:
QGCTool
(
app
,
toolbox
)
...
...
@@ -35,26 +35,21 @@ void GPSManager::connectGPS(const QString& device)
//create RTCM device
_rtcmMavlink
=
new
RTCMMavlink
(
*
_toolbox
);
connect
(
_gpsProvider
,
SIGNAL
(
RTCMDataUpdate
(
QByteArray
)),
_rtcmMavlink
,
SLOT
(
RTCMDataUpdate
(
QByteArray
)));
connect
(
_gpsProvider
,
&
GPSProvider
::
RTCMDataUpdate
,
_rtcmMavlink
,
&
RTCMMavlink
::
RTCMDataUpdate
);
//test: connect to position update
connect
(
_gpsProvider
,
SIGNAL
(
positionUpdate
(
GPSPositionMessage
)),
this
,
SLOT
(
GPSPositionUpdate
(
GPSPositionMessage
)));
connect
(
_gpsProvider
,
SIGNAL
(
satelliteInfoUpdate
(
GPSSatelliteMessage
)),
this
,
SLOT
(
GPSSatelliteUpdate
(
GPSSatelliteMessage
)));
connect
(
_gpsProvider
,
&
GPSProvider
::
positionUpdate
,
this
,
&
GPSManager
::
GPSPositionUpdate
);
connect
(
_gpsProvider
,
&
GPSProvider
::
satelliteInfoUpdate
,
this
,
&
GPSManager
::
GPSSatelliteUpdate
);
}
void
GPSManager
::
GPSPositionUpdate
(
GPSPositionMessage
msg
)
{
qDebug
(
"GPS: got position update: alt=%i, long=%i, lat=%i"
,
msg
.
position_data
.
alt
,
msg
.
position_data
.
lon
,
msg
.
position_data
.
lat
);
qCDebug
(
RTKGPSLog
)
<<
QString
(
"GPS: got position update: alt=%1, long=%2, lat=%3"
).
arg
(
msg
.
position_data
.
alt
).
arg
(
msg
.
position_data
.
lon
).
arg
(
msg
.
position_data
.
lat
);
}
void
GPSManager
::
GPSSatelliteUpdate
(
GPSSatelliteMessage
msg
)
{
q
Debug
(
"GPS: got satellite info update, %i satellites"
,
(
int
)
msg
.
satellite_data
.
count
);
q
CDebug
(
RTKGPSLog
)
<<
QString
(
"GPS: got satellite info update, %1 satellites"
).
arg
(
(
int
)
msg
.
satellite_data
.
count
);
}
void
GPSManager
::
cleanup
()
...
...
src/GPS/GPSProvider.cc
View file @
6e63553b
...
...
@@ -9,6 +9,7 @@
#include "GPSProvider.h"
#include "QGCLoggingCategory.h"
#define GPS_RECEIVE_TIMEOUT 1200
...
...
@@ -96,7 +97,7 @@ void GPSProvider::run()
}
}
}
q
Debug
(
)
<<
"Exiting GPS thread"
;
q
CDebug
(
RTKGPSLog
)
<<
"Exiting GPS thread"
;
}
GPSProvider
::
GPSProvider
(
const
QString
&
device
,
bool
enableSatInfo
,
const
std
::
atomic_bool
&
requestStop
)
...
...
@@ -165,8 +166,7 @@ int GPSProvider::callback(GPSCallbackType type, void *data1, int data2)
case
GPSCallbackType
:
:
surveyInStatus
:
{
SurveyInStatus
*
status
=
(
SurveyInStatus
*
)
data1
;
qInfo
(
"Survey-in status: %is cur accuracy: %imm valid: %i active: %i"
,
status
->
duration
,
status
->
mean_accuracy
,
(
int
)(
status
->
flags
&
1
),
(
int
)((
status
->
flags
>>
1
)
&
1
));
qCDebug
(
RTKGPSLog
)
<<
QString
(
"Survey-in status: %1s cur accuracy: %2mm valid: %3 active: %4"
).
arg
(
status
->
duration
).
arg
(
status
->
mean_accuracy
).
arg
((
int
)(
status
->
flags
&
1
)).
arg
((
int
)((
status
->
flags
>>
1
)
&
1
));
}
break
;
...
...
src/QGCLoggingCategory.cc
View file @
6e63553b
...
...
@@ -22,6 +22,7 @@ QGC_LOGGING_CATEGORY(MissionCommandsLog, "MissionCommandsLog")
QGC_LOGGING_CATEGORY
(
MissionItemLog
,
"MissionItemLog"
)
QGC_LOGGING_CATEGORY
(
ParameterManagerLog
,
"ParameterManagerLog"
)
QGC_LOGGING_CATEGORY
(
GeotaggingLog
,
"GeotaggingLog"
)
QGC_LOGGING_CATEGORY
(
RTKGPSLog
,
"RTKGPSLog"
)
QGCLoggingCategoryRegister
*
_instance
=
NULL
;
const
char
*
QGCLoggingCategoryRegister
::
_filterRulesSettingsGroup
=
"LoggingFilters"
;
...
...
src/QGCLoggingCategory.h
View file @
6e63553b
...
...
@@ -24,6 +24,7 @@ Q_DECLARE_LOGGING_CATEGORY(MissionCommandsLog)
Q_DECLARE_LOGGING_CATEGORY
(
MissionItemLog
)
Q_DECLARE_LOGGING_CATEGORY
(
ParameterManagerLog
)
Q_DECLARE_LOGGING_CATEGORY
(
GeotaggingLog
)
Q_DECLARE_LOGGING_CATEGORY
(
RTKGPSLog
)
/// @def QGC_LOGGING_CATEGORY
/// This is a QGC specific replacement for Q_LOGGING_CATEGORY. It will register the category name into a
...
...
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