Unverified Commit ce7d6a1b authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #8664 from mavlink/pr-fix-hashtag

Vehicle: fix removal of hashtag in statustext
parents 43cc9a1b 68b649e9
......@@ -1001,8 +1001,17 @@ void Vehicle::_chunkedStatusTextCompleted(uint8_t compId)
// If the message is NOTIFY or higher severity, or starts with a '#',
// then read it aloud.
if (messageText.startsWith("#") || severity <= MAV_SEVERITY_NOTICE) {
messageText.remove("#");
bool readAloud = false;
if (messageText.startsWith("#")) {
messageText.remove(0, 1);
readAloud = true;
}
else if (severity <= MAV_SEVERITY_NOTICE) {
readAloud = true;
}
if (readAloud) {
if (!skipSpoken) {
qgcApp()->toolbox()->audioOutput()->say(messageText);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment