diff --git a/src/ui/uas/QGCMessageView.cc b/src/ui/uas/QGCMessageView.cc index 0e9d23d822f5ed2b4f3c1d0a485a62ddc8cfa93c..a1fdcce52b64db52246a078a4a5ee029e19a6798 100644 --- a/src/ui/uas/QGCMessageView.cc +++ b/src/ui/uas/QGCMessageView.cc @@ -1,11 +1,15 @@ #include "QGCMessageView.h" -#include "ui_QGCMessageView.h" -#include "UASManager.h" -#include "QGCUnconnectedInfoWidget.h" #include #include + +#include "GAudioOutput.h" +#include "QGCUnconnectedInfoWidget.h" +#include "UASManager.h" +#include "ui_QGCMessageView.h" + + QGCMessageView::QGCMessageView(QWidget *parent) : QWidget(parent), activeUAS(NULL), @@ -68,7 +72,8 @@ void QGCMessageView::handleTextMessage(int uasid, int compId, int severity, QStr QString colorName(uas->getColor().name()); //change styling based on severity if (160 == severity ) { //TODO where is the constant for "critical" severity? - msgWidget->appendHtml(QString("

[%1:%2] %3

").arg(uasName).arg(compId).arg(text)); + GAudioOutput::instance()->say(text.toLower()); + msgWidget->appendHtml(QString("

[%1:%2] %3

").arg(uasName).arg(compId).arg(text)); } else { msgWidget->appendHtml(QString("

[%2:%3] %4

").arg(colorName).arg(uasName).arg(compId).arg(text));