diff --git a/src/ui/uas/QGCMessageView.cc b/src/ui/uas/QGCMessageView.cc index 5ed1c75a0854f3897c5e0f18a86f41eda7069cd3..10e1d559d863632bbd9191fe97441297128737fc 100644 --- a/src/ui/uas/QGCMessageView.cc +++ b/src/ui/uas/QGCMessageView.cc @@ -23,7 +23,7 @@ QGCMessageView::QGCMessageView(QWidget *parent) : ui->plainTextEdit->hide(); // Enable the right-click menu for the text editor. This works because the plainTextEdit - // widget has its context menu policy set to its actions list. So we any actions we add + // widget has its context menu policy set to its actions list. So any actions we add // to this widget's action list will be automatically displayed. // We only have the clear action right now. QAction* clearAction = new QAction(tr("Clear Text"), this); @@ -86,7 +86,7 @@ void QGCMessageView::handleTextMessage(int uasid, int compId, int severity, QStr // Get all the UAS info. UASInterface *uas = UASManager::instance()->getUASForId(uasid); - QString uasName(uas->getUASName()); + //QString uasName(uas->getUASName()); QString colorName(uas->getColor().name()); // Color the output depending on the message severity. We have 3 distinct cases: @@ -106,12 +106,12 @@ void QGCMessageView::handleTextMessage(int uasid, int compId, int severity, QStr GAudioOutput::instance()->say(text.toLower()); style = QString("color:#DC143C; font-weight:bold"); break; - case MAV_SEVERITY_WARNING: case MAV_SEVERITY_NOTICE: + case MAV_SEVERITY_WARNING: style = QString("color:%1; font-weight:bold").arg(colorName); break; default: - style = QString("color:%1; font-weight:bold").arg(colorName); + style = QString("color:white; font-weight:bold").arg(colorName); break; } @@ -149,8 +149,8 @@ void QGCMessageView::handleTextMessage(int uasid, int compId, int severity, QStr } // Finally append the properly-styled text with a timestamp. - QString dateString = QDateTime::currentDateTime().toString(Qt::SystemLocaleShortDate); - msgWidget->appendHtml(QString("
[%2 - %3:%4]%5 %6
").arg(style).arg(dateString).arg(uasName).arg(compId).arg(severityText).arg(text)); + QString dateString = QDateTime::currentDateTime().toString("hh:mm:ss.zzz"); + msgWidget->appendHtml(QString("[%2 - COMP:%4]%5 %6
").arg(style).arg(dateString).arg(compId).arg(severityText).arg(text)); // Ensure text area scrolls correctly scroller->setValue(scroller->maximum());