Skip to content

Commit 96e97cf

Browse files
committed
tweak
1 parent aeaaf4b commit 96e97cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_ads1x15/ads1x15.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ def _read(self, pin):
152152
"""Perform an ADC read. Returns the signed integer result of the read."""
153153
fast = True
154154
if self._last_pin_read != pin:
155+
self._last_pin_read = pin
155156
fast = False
156157
config = _ADS1X15_CONFIG_OS_SINGLE
157158
config |= (pin & 0x07) << _ADS1X15_CONFIG_MUX_OFFSET
@@ -165,7 +166,6 @@ def _read(self, pin):
165166
while not self._conversion_complete():
166167
pass
167168

168-
self._last_pin_read = pin
169169
return self._conversion_value(self.get_last_result(fast))
170170

171171
def _conversion_complete(self):

0 commit comments

Comments
 (0)