Browse Source

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

Vehicle: fix removal of hashtag in statustext
QGC4.4
Don Gagne 5 years ago committed by GitHub
parent
commit
ce7d6a1b22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      src/Vehicle/Vehicle.cc

13
src/Vehicle/Vehicle.cc

@ -1001,8 +1001,17 @@ void Vehicle::_chunkedStatusTextCompleted(uint8_t compId) @@ -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);
}

Loading…
Cancel
Save