From a6ea286726ebd184abf8d042985d467782f23466 Mon Sep 17 00:00:00 2001 From: Kevin Matz Date: Sun, 17 Nov 2019 10:54:43 -0500 Subject: [PATCH] uniform variable naming --- buttond.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/buttond.py b/buttond.py index 60c0df8..8bd8bca 100755 --- a/buttond.py +++ b/buttond.py @@ -46,13 +46,13 @@ for b in config.get('button', 'names').split(','): try: # move to config section c = config[b] - # read macro values + # read from settings + pin = c.get('pin', None) closed = c.get('close', None) opened = c.get('open', None) # set up button on pin - p = c.get('pin', None) - print('init button on GPIO', p) - _buttons[b] = Button(p) + print('init button on GPIO', pin) + _buttons[b] = Button(pin) # connect button callbacks to anonymous functions _buttons[b].when_pressed = lambda path=closed: _activate(path) _buttons[b].when_released = lambda path=opened: _activate(path)