Commit e1b7d61b authored by Julian Oes's avatar Julian Oes

Vehicle: fix removal of hashtag in statustext

This fixes a bug where a URL containing a hashtag (#) was displayed
without the hashtag.
parent a675b2b2
......@@ -1000,8 +1000,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) {
bool readAloud = false;
if (messageText.startsWith("#")) {
messageText.remove("#");
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