Logical Switches range bugfixes (both Companion and Firmware)

This commit is contained in:
bsongis
2014-06-20 16:06:55 +02:00
parent 13fd1f04c0
commit 405391033d
5 changed files with 56 additions and 54 deletions
+1 -1
View File
@@ -408,7 +408,7 @@ void TelemetryCustomScreen::updateBar(int line)
barsCB[line]->setCurrentIndex(index);
if (index) {
RawSource source = RawSource(SOURCE_TYPE_TELEMETRY, index-1);
RawSourceRange range = source.getRange(model, generalSettings, true);
RawSourceRange range = source.getRange(model, generalSettings, RANGE_SINGLE_PRECISION);
int max = round((range.max - range.min) / range.step);
if (int(255-screen.body.bars[line].barMax) > max)
screen.body.bars[line].barMax = 255 - max;