diff --git a/src/ui/UASInfo.ui b/src/ui/UASInfo.ui index 9c7fb89..a9a5a93 100644 --- a/src/ui/UASInfo.ui +++ b/src/ui/UASInfo.ui @@ -66,7 +66,7 @@ - + @@ -109,7 +109,7 @@ - + Qt::Horizontal @@ -171,7 +171,7 @@ - + @@ -257,7 +257,7 @@ - + @@ -343,7 +343,7 @@ - + @@ -380,56 +380,14 @@ - + Qt::Horizontal - - - - I2C Errors - - - - - - - 0 - - - - - - - SPI Errors - - - - - - - 0 - - - - - - - UART Errors - - - - - - - 0 - - - - + Qt::Vertical @@ -445,6 +403,13 @@ + + + + No error status received yet + + + diff --git a/src/ui/uas/UASInfoWidget.cc b/src/ui/uas/UASInfoWidget.cc index 7dfe569..c835c5f 100644 --- a/src/ui/uas/UASInfoWidget.cc +++ b/src/ui/uas/UASInfoWidget.cc @@ -110,7 +110,7 @@ void UASInfoWidget::updateBattery(UASInterface* uas, double voltage, double perc void UASInfoWidget::updateErrorCount(int uasid, QString component, QString device, int count) { - qDebug() << __FILE__ << __LINE__ << activeUAS->getUASID() << "=" << uasid; + //qDebug() << __FILE__ << __LINE__ << activeUAS->getUASID() << "=" << uasid; if (activeUAS->getUASID() == uasid) { errors.remove(component + ":" + device); @@ -182,5 +182,16 @@ void UASInfoWidget::refresh() ui.sendLossLabel->setText(QString::number(sendLoss, 'f', 2)); QString errorString; - // ui. + QMapIterator i(errors); + while (i.hasNext()) + { + i.next(); + errorString += QString(i.key() + ": %1 ").arg(i.value()); + + // FIXME + errorString.replace("IMU:", ""); + + + } + ui.errorLabel->setText(errorString); }