Fixup ridefilecache best decimals

.. forgot that the values are converted to
   zero decimals when stored.

This fixes strange results when filtering by
wpk or speed, or any series that has decimal
places.
This commit is contained in:
Mark Liversedge
2013-08-05 08:37:25 +01:00
parent 0790d16be5
commit 44e0d6b744

View File

@@ -1244,7 +1244,8 @@ RideFileCache::best(Context *context, QString filename, RideFile::SeriesType ser
inFile.readRawData((char*)&readhere, sizeof(float));
cacheFile.close();
return readhere; // will convert to double
double divisor = pow(10, decimalsFor(series)); // ? 10 : 1;
return readhere / divisor; // will convert to double
}
return 0;