From 6865e01c8c3cd3c7e52230709e2e82c1e14d12fe Mon Sep 17 00:00:00 2001 From: tstellanova Date: Mon, 19 Aug 2013 23:20:07 -0700 Subject: [PATCH] support speaking critical messages --- src/ui/uas/QGCMessageView.cc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/ui/uas/QGCMessageView.cc b/src/ui/uas/QGCMessageView.cc index 0e9d23d82..a1fdcce52 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)); -- 2.22.0