Skip to content

Commit

Permalink
fix vitiral#6: set(pin, gpio.LOW) == set(pin, 0)
Browse files Browse the repository at this point in the history
  • Loading branch information
vitiral committed Oct 3, 2017
1 parent 5cc51bb commit 9f62007
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gpio.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ def read(pin):
@_verify
def set(pin, value):
'''set the pin value to 0 or 1'''
if value is LOW:
value = 0
value = int(bool(value))
log.debug("Write {0}: {1}".format(pin, value))
f = _open[pin]['value']
Expand Down

0 comments on commit 9f62007

Please sign in to comment.