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
71eca40b
Commit
71eca40b
authored
Mar 12, 2015
by
Bryant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Output audio for NOTICE severity STATUSTEXT messages.
parent
34337970
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
UAS.cc
src/uas/UAS.cc
+4
-1
No files found.
src/uas/UAS.cc
View file @
71eca40b
...
...
@@ -1247,12 +1247,15 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
QByteArray
b
;
b
.
resize
(
MAVLINK_MSG_STATUSTEXT_FIELD_TEXT_LEN
+
1
);
mavlink_msg_statustext_get_text
(
&
message
,
b
.
data
());
// Ensure NUL-termination
b
[
b
.
length
()
-
1
]
=
'\0'
;
QString
text
=
QString
(
b
);
int
severity
=
mavlink_msg_statustext_get_severity
(
&
message
);
if
(
text
.
startsWith
(
"#"
)
||
severity
<=
MAV_SEVERITY_WARNING
)
// Now if the status message starts with "#audio:", or it's at least a
// severity level of NOTICE or higher, output it as an audio message.
if
(
text
.
startsWith
(
"#audio:"
)
||
severity
<=
MAV_SEVERITY_NOTICE
)
{
text
.
remove
(
"#audio:"
);
emit
textMessageReceived
(
uasId
,
message
.
compid
,
severity
,
text
);
...
...
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