Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qgroundcontrol
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Valentin Platzgummer
qgroundcontrol
Commits
8eab3f6e
Commit
8eab3f6e
authored
8 years ago
by
Don Gagne
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #4213 from DonLakeFlyer/CalMessages
Filter out calibration messages
parents
17f74fe7
e1864d0b
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/uas/UASMessageHandler.cc
+12
-11
12 additions, 11 deletions
src/uas/UASMessageHandler.cc
src/uas/UASMessageHandler.h
+1
-1
1 addition, 1 deletion
src/uas/UASMessageHandler.h
with
13 additions
and
12 deletions
src/uas/UASMessageHandler.cc
+
12
−
11
View file @
8eab3f6e
...
...
@@ -41,7 +41,7 @@ bool UASMessage::severityIsError()
UASMessageHandler
::
UASMessageHandler
(
QGCApplication
*
app
)
:
QGCTool
(
app
)
,
_active
UAS
(
NULL
)
,
_active
Vehicle
(
NULL
)
,
_activeComponent
(
-
1
)
,
_multiComp
(
false
)
,
_errorCount
(
0
)
...
...
@@ -87,27 +87,28 @@ void UASMessageHandler::clearMessages()
void
UASMessageHandler
::
_activeVehicleChanged
(
Vehicle
*
vehicle
)
{
// If we were already attached to an autopilot, disconnect it.
if
(
_activeUAS
)
{
disconnect
(
_activeUAS
,
&
UASInterface
::
textMessageReceived
,
this
,
&
UASMessageHandler
::
handleTextMessage
);
_activeUAS
=
NULL
;
if
(
_activeVehicle
)
{
disconnect
(
_activeVehicle
->
uas
(),
&
UASInterface
::
textMessageReceived
,
this
,
&
UASMessageHandler
::
handleTextMessage
);
_activeVehicle
=
NULL
;
clearMessages
();
emit
textMessageReceived
(
NULL
);
}
// And now if there's an autopilot to follow, set up the UI.
if
(
vehicle
)
{
UAS
*
uas
=
vehicle
->
uas
();
// And now if there's an autopilot to follow, set up the UI.
if
(
vehicle
)
{
// Connect to the new UAS.
clearMessages
();
_active
UAS
=
uas
;
connect
(
uas
,
&
UASInterface
::
textMessageReceived
,
this
,
&
UASMessageHandler
::
handleTextMessage
);
_active
Vehicle
=
vehicle
;
connect
(
_activeVehicle
->
uas
()
,
&
UASInterface
::
textMessageReceived
,
this
,
&
UASMessageHandler
::
handleTextMessage
);
}
}
void
UASMessageHandler
::
handleTextMessage
(
int
,
int
compId
,
int
severity
,
QString
text
)
{
// Hack to prevent calibration messages from cluttering things up
if
(
_activeVehicle
->
px4Firmware
()
&&
text
.
startsWith
(
QStringLiteral
(
"[cal] "
)))
{
return
;
}
// Color the output depending on the message severity. We have 3 distinct cases:
// 1: If we have an ERROR or worse, make it bigger, bolder, and highlight it red.
...
...
This diff is collapsed.
Click to expand it.
src/uas/UASMessageHandler.h
+
1
−
1
View file @
8eab3f6e
...
...
@@ -144,7 +144,7 @@ private slots:
void
_activeVehicleChanged
(
Vehicle
*
vehicle
);
private
:
UASInterfac
e
*
_active
UAS
;
Vehicl
e
*
_active
Vehicle
;
int
_activeComponent
;
bool
_multiComp
;
QVector
<
UASMessage
*>
_messages
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment