Skip to content

Commit

Permalink
Merge pull request #15 from tekktrik/dev/change-argname
Browse files Browse the repository at this point in the history
Change argument name to *_dio
  • Loading branch information
dhalbert committed Jul 7, 2022
2 parents b7c0de0 + 3d5827e commit 36dbc55
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions adafruit_dymoscale.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class DYMOScale:
def __init__(
self,
data_pin: microcontroller.Pin,
units_pin: DigitalInOut,
units_dio: DigitalInOut,
timeout: float = 1.0,
) -> None:
"""Sets up a DYMO postal scale.
Expand All @@ -63,7 +63,7 @@ def __init__(
"""
self.timeout = timeout
# set up the toggle pin
self.units_pin = units_pin
self.units_dio = units_dio
# set up the dymo data pin
self.dymo = PulseIn(data_pin, maxlen=96, idle_state=True)

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

Expand Down

0 comments on commit 36dbc55

Please sign in to comment.