Skip to content

Commit

Permalink
return round value
Browse files Browse the repository at this point in the history
  • Loading branch information
MkLHX committed Jul 2, 2020
1 parent a9d231e commit fa42de0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/GreenPonik_PH.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ def readPH(self, voltage):
3.0 - (_acidVoltage-1500.0)/3.0)
intercept = 7.0 - slope*(_neutralVoltage-1500.0)/3.0
_phValue = slope*(voltage-1500.0)/3.0+intercept
round(_phValue, 2)
return _phValue
return round(_phValue, 2)

def calibration(self, voltage):
if (voltage > 1322 and voltage < 1678):
Expand Down

0 comments on commit fa42de0

Please sign in to comment.