Fix a small issue in setPowerScaleFactor (#3634)

If a value was set for the powerScaleCalibration factor, the weight was clipped between 0.8 and 1.2kg. That would be an easy ride uphill for sure.
This commit is contained in:
Michel Dagenais
2020-10-14 23:02:21 -04:00
committed by GitHub
parent b2e90c0af6
commit 4c62c52fc3

View File

@@ -103,8 +103,8 @@ void Fortius::setBrakeCalibrationFactor(double brakeCalibrationFactor)
// output power adjusted by this value so user can compare with hub or crank based readings
void Fortius::setPowerScaleFactor(double powerScaleFactor)
{
if (weight < 0.8) weight = 0.8;
if (weight > 1.2) weight = 1.2;
if (powerScaleFactor < 0.8) powerScaleFactor = 0.8;
if (powerScaleFactor > 1.2) powerScaleFactor = 1.2;
pvars.lock();
this->powerScaleFactor = powerScaleFactor;