[Horus] Prevent Value widget from being invisible when telemetry isn't available and it's displaying a telemetry value

This commit is contained in:
Andre Bernet
2016-06-11 17:22:20 +02:00
parent 6db0c0791a
commit 22efe664d5
+1 -4
View File
@@ -87,10 +87,7 @@ void ValueWidget::refresh()
if (field >= MIXSRC_FIRST_TELEM) {
TelemetryItem & telemetryItem = telemetryItems[(field-MIXSRC_FIRST_TELEM)/3]; // TODO macro to convert a source to a telemetry index
if (!telemetryItem.isAvailable()) {
return;
}
else if (telemetryItem.isOld()) {
if (!telemetryItem.isAvailable() || telemetryItem.isOld()) {
color = ALARM_COLOR;
}
}