Skip to content

Commit

Permalink
Add negative number possibility
Browse files Browse the repository at this point in the history
  • Loading branch information
GatCode committed May 5, 2021
1 parent 8e3b77a commit 6c785ac
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/ScaleStabilizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,6 @@ double ScaleStabilizer::getStablilizedReading(double displayResolution, int deci
double codeValue = getAvg();
double outputValue = codeValue;

// remove negative numbers and set to 0 if close to 0
if (outputValue < 0.5)
{
outputValue = 0.0;
}

// round to given decimal places
float scale = pow(10, decimalPlaces);
outputValue = round(outputValue * scale) / scale;
Expand Down

0 comments on commit 6c785ac

Please sign in to comment.