Skip to content

Commit 025d6b7

Browse files
authored
Merge pull request #12 from adafruit/patch-fix
Linted
2 parents 19a0e73 + e2e7567 commit 025d6b7

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

adafruit_dymoscale.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,10 @@ def get_scale_data(self):
9999
bits = [0] * 96 # there are 12 bytes = 96 bits of data
100100
bit_idx = 0 # we will count a bit at a time
101101
bit_val = False # first pulses will be LOW
102-
for i in range(len(self.dymo)):
103-
if self.dymo[i] == 65535: # check for the pulse between transmits
102+
for i in self.dymo:
103+
if i == 65535: # check for the pulse between transmits
104104
break
105-
num_bits = int(
106-
self.dymo[i] / PULSE_WIDTH + 0.5
107-
) # ~14KHz == ~7.5us per clock
105+
num_bits = int(i / PULSE_WIDTH + 0.5) # ~14KHz == ~7.5us per clock
108106
bit = 0
109107
while bit < num_bits:
110108
bits[bit_idx] = bit_val

0 commit comments

Comments
 (0)