Skip to content

Commit 36dbc55

Browse files
authored
Merge pull request #15 from tekktrik/dev/change-argname
Change argument name to *_dio
2 parents b7c0de0 + 3d5827e commit 36dbc55

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

adafruit_dymoscale.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class DYMOScale:
5353
def __init__(
5454
self,
5555
data_pin: microcontroller.Pin,
56-
units_pin: DigitalInOut,
56+
units_dio: DigitalInOut,
5757
timeout: float = 1.0,
5858
) -> None:
5959
"""Sets up a DYMO postal scale.
@@ -63,7 +63,7 @@ def __init__(
6363
"""
6464
self.timeout = timeout
6565
# set up the toggle pin
66-
self.units_pin = units_pin
66+
self.units_dio = units_dio
6767
# set up the dymo data pin
6868
self.dymo = PulseIn(data_pin, maxlen=96, idle_state=True)
6969

@@ -86,7 +86,7 @@ def toggle_unit_button(self, switch_units: bool = False) -> None:
8686
else: # toggle and preserve current unit state
8787
toggle_amt = 4
8888
while toggle_times < toggle_amt:
89-
self.units_pin.value ^= 1
89+
self.units_dio.value ^= 1
9090
time.sleep(2)
9191
toggle_times += 1
9292

0 commit comments

Comments
 (0)