Skip to content

Commit 0298400

Browse files
author
brentru
committed
only return grams
1 parent cf9f5ed commit 0298400

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

adafruit_dymoscale.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@ def __init__(self, data_pin, units_pin, timeout=1.0):
7171
def weight(self):
7272
"""Weight in grams"""
7373
weight = self.get_scale_data()
74-
if self.units == OUNCES:
75-
weight *= 28.35
7674
self.units = 'g'
7775
return weight
7876

@@ -148,5 +146,5 @@ def get_scale_data(self):
148146
if data_bytes[4] & 0x80:
149147
self.tare = True
150148
data_bytes[4] -= 0x100
151-
weight *= 10 ** data_bytes[4]
149+
#weight *= 10 ** data_bytes[4]
152150
return weight

0 commit comments

Comments
 (0)