Skip to content

Commit 0cef113

Browse files
author
brentru
committed
remove redundant unit conversion in weight, remove debug prints
1 parent 5e4be31 commit 0cef113

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

adafruit_dymoscale.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,7 @@ def __init__(self, data_pin, units_pin, timeout=1.0):
7070
def weight(self):
7171
"""Weight in grams"""
7272
weight = self.get_scale_data()
73-
#print('debugg: ', weight)
7473
if self.units == OUNCES:
75-
weight = weight * 28.35
7674
self.units = 'oz'
7775
elif self.units == GRAMS:
7876
self.units = 'g'
@@ -89,7 +87,6 @@ def toggle_unit_button(self, switch_units=False):
8987
toggle_amt = 4
9088
while toggle_times < toggle_amt:
9189
self.units_pin.value ^= 1
92-
print('toggle: ', self.units_pin.value)
9390
time.sleep(2)
9491
toggle_times+=1
9592

0 commit comments

Comments
 (0)