Skip to content

Commit

Permalink
Update nau7802py.py
Browse files Browse the repository at this point in the history
  • Loading branch information
longapalooza committed Jun 1, 2020
1 parent 7c10e97 commit 294c415
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nau7802py.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def getWeight(self, allowNegativeWeights = False, samplesToTake = 10): # Once
# Prevent the current reading from being less than zero offset
# This happens when the scale is zero'd, unloaded, and the load cell reports a value slightly less than zero value
# causing the weight to be negative or jump to millions of pounds
if allowNegativeWeights == False:
if not allowNegativeWeights:
if onScale < self.zeroOffset:
onScale = self.zeroOffset # Force reading to zero

Expand Down

0 comments on commit 294c415

Please sign in to comment.