Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
2b20abe6
Commit
2b20abe6
authored
Mar 14, 2015
by
Bryant
Browse files
STATUS_TEXT messages are now read aloud if they are prepended with '#'.
parent
71eca40b
Changes
1
Show whitespace changes
Inline
Side-by-side
src/uas/UAS.cc
View file @
2b20abe6
...
...
@@ -1253,11 +1253,11 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
QString
text
=
QString
(
b
);
int
severity
=
mavlink_msg_statustext_get_severity
(
&
message
);
//
Now i
f 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
)
//
I
f the message
is NOTIFY or higher severity, or starts with a '#',
// then read it aloud
.
if
(
text
.
startsWith
(
"#"
)
||
severity
<=
MAV_SEVERITY_NOTICE
)
{
text
.
remove
(
"#
audio:
"
);
text
.
remove
(
"#"
);
emit
textMessageReceived
(
uasId
,
message
.
compid
,
severity
,
text
);
GAudioOutput
::
instance
()
->
say
(
text
.
toLower
(),
severity
);
}
...
...
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