be verbose when setting up buttons
This commit is contained in:
parent
fbf406e92d
commit
5799184fa6
|
@ -50,7 +50,9 @@ for b in config.get('button', 'names').split(','):
|
||||||
closed = c.get('close', None)
|
closed = c.get('close', None)
|
||||||
opened = c.get('open', None)
|
opened = c.get('open', None)
|
||||||
# set up button on pin
|
# set up button on pin
|
||||||
_buttons[b] = Button(c.getint("pin", None))
|
p = c.get('pin', None)
|
||||||
|
print('init button on GPIO', p)
|
||||||
|
_buttons[b] = Button(p)
|
||||||
# connect button callbacks to anonymous functions
|
# connect button callbacks to anonymous functions
|
||||||
_buttons[b].when_pressed = lambda: activate(closed)
|
_buttons[b].when_pressed = lambda: activate(closed)
|
||||||
_buttons[b].when_released = lambda: activate(opened)
|
_buttons[b].when_released = lambda: activate(opened)
|
||||||
|
|
Loading…
Reference in New Issue