Commit 81590ac9 authored by lm's avatar lm
Browse files

Added error counters

parent 09ebae05
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="4" colspan="4"> <item row="0" column="4" colspan="2">
<widget class="QProgressBar" name="batteryBar"> <widget class="QProgressBar" name="batteryBar">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="8" rowspan="6"> <item row="0" column="6" rowspan="6">
<spacer name="horizontalSpacer"> <spacer name="horizontalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
...@@ -171,7 +171,7 @@ ...@@ -171,7 +171,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="4" colspan="4"> <item row="1" column="4" colspan="2">
<widget class="QProgressBar" name="receiveLossBar"> <widget class="QProgressBar" name="receiveLossBar">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
...@@ -257,7 +257,7 @@ ...@@ -257,7 +257,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="4" colspan="4"> <item row="2" column="4" colspan="2">
<widget class="QProgressBar" name="sendLossBar"> <widget class="QProgressBar" name="sendLossBar">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
...@@ -343,7 +343,7 @@ ...@@ -343,7 +343,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="4" colspan="4"> <item row="3" column="4" colspan="2">
<widget class="QProgressBar" name="loadBar"> <widget class="QProgressBar" name="loadBar">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
...@@ -380,56 +380,14 @@ ...@@ -380,56 +380,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="0" colspan="8"> <item row="4" column="0" colspan="6">
<widget class="Line" name="line"> <widget class="Line" name="line">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item row="5" column="0"> <item row="6" column="0" colspan="7">
<widget class="QLabel" name="label_4">
<property name="text">
<string>I2C Errors</string>
</property>
</widget>
</item>
<item row="5" column="1" colspan="2">
<widget class="QLabel" name="i2cErrorLabel">
<property name="text">
<string>0</string>
</property>
</widget>
</item>
<item row="5" column="4">
<widget class="QLabel" name="label_5">
<property name="text">
<string>SPI Errors</string>
</property>
</widget>
</item>
<item row="5" column="5">
<widget class="QLabel" name="spiErrorLabel">
<property name="text">
<string>0</string>
</property>
</widget>
</item>
<item row="5" column="6">
<widget class="QLabel" name="label_10">
<property name="text">
<string>UART Errors</string>
</property>
</widget>
</item>
<item row="5" column="7">
<widget class="QLabel" name="uartErrorLabel">
<property name="text">
<string>0</string>
</property>
</widget>
</item>
<item row="6" column="0" colspan="9">
<spacer name="verticalSpacer"> <spacer name="verticalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
...@@ -445,6 +403,13 @@ ...@@ -445,6 +403,13 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="5" column="0" colspan="6">
<widget class="QLabel" name="errorLabel">
<property name="text">
<string>No error status received yet</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
<resources/> <resources/>
......
...@@ -110,7 +110,7 @@ void UASInfoWidget::updateBattery(UASInterface* uas, double voltage, double perc ...@@ -110,7 +110,7 @@ void UASInfoWidget::updateBattery(UASInterface* uas, double voltage, double perc
void UASInfoWidget::updateErrorCount(int uasid, QString component, QString device, int count) 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) if (activeUAS->getUASID() == uasid)
{ {
errors.remove(component + ":" + device); errors.remove(component + ":" + device);
...@@ -182,5 +182,16 @@ void UASInfoWidget::refresh() ...@@ -182,5 +182,16 @@ void UASInfoWidget::refresh()
ui.sendLossLabel->setText(QString::number(sendLoss, 'f', 2)); ui.sendLossLabel->setText(QString::number(sendLoss, 'f', 2));
QString errorString; QString errorString;
// ui. QMapIterator<QString, int> i(errors);
while (i.hasNext())
{
i.next();
errorString += QString(i.key() + ": %1 ").arg(i.value());
// FIXME
errorString.replace("IMU:", "");
}
ui.errorLabel->setText(errorString);
} }
Supports Markdown
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