more verbose output when registering callbacks
This commit is contained in:
parent
a6ea286726
commit
9f4a575a6d
|
@ -54,7 +54,9 @@ for b in config.get('button', 'names').split(','):
|
|||
print('init button on GPIO', pin)
|
||||
_buttons[b] = Button(pin)
|
||||
# connect button callbacks to anonymous functions
|
||||
print('connecting GPIO', pin, '"closed" to macro', closed)
|
||||
_buttons[b].when_pressed = lambda path=closed: _activate(path)
|
||||
print('connecting GPIO', pin, '"opened" to macro', opened)
|
||||
_buttons[b].when_released = lambda path=opened: _activate(path)
|
||||
|
||||
except (KeyError, GPIODeviceError) as e:
|
||||
|
|
Loading…
Reference in New Issue