Fix Target load Dial

When working with ANT+ devices the load dial always
showed zero, because the ANT device was not updating
the realtime data with the desired load.

In addition, the target load telemetry always showed
watts even when working in slope mode (where it should
show the gradient).

Fixes #532.
This commit is contained in:
Mark Liversedge
2011-12-01 21:35:39 +00:00
parent ae6b8869f5
commit c71ea615ca
10 changed files with 69 additions and 33 deletions

View File

@@ -328,6 +328,16 @@ DialWindow::telemetryUpdate(const RealtimeData &rtData)
}
break;
case RealtimeData::Load:
if (rtData.mode == ERG || rtData.mode == MRC) {
value = rtData.getLoad();
valueLabel->setText(QString("%1").arg(round(value)));
} else {
value = rtData.getSlope();
valueLabel->setText(QString("%1%").arg(value, 0, 'f', 1));
}
break;
default:
valueLabel->setText(QString("%1").arg(round(value)));
break;