Fix duplicate variable name
This commit is contained in:
parent
3627bb0460
commit
a1b5e93ef4
1 changed files with 6 additions and 6 deletions
|
|
@ -58,16 +58,16 @@ statusled.direction = Direction.OUTPUT
|
||||||
print("Waiting for button presses")
|
print("Waiting for button presses")
|
||||||
|
|
||||||
|
|
||||||
def pressbutton(i):
|
def pressbutton(index):
|
||||||
switch_led = leds[i] # find the switch LED
|
switch_led = leds[index] # find the switch LED
|
||||||
k = buttonkeys[i] # get the corresp. keycode/str
|
k = buttonkeys[index] # get the corresp. keycode/str
|
||||||
switch_led.value = True # turn on LED
|
switch_led.value = True # turn on LED
|
||||||
kbd.press(k) # send keycode
|
kbd.press(k) # send keycode
|
||||||
|
|
||||||
|
|
||||||
def releasebutton(i):
|
def releasebutton(index):
|
||||||
switch_led = leds[i] # find the switch LED
|
switch_led = leds[index] # find the switch LED
|
||||||
k = buttonkeys[i] # get the corresp. keycode/str
|
k = buttonkeys[index] # get the corresp. keycode/str
|
||||||
switch_led.value = False # turn on LED
|
switch_led.value = False # turn on LED
|
||||||
kbd.release(k) # send keycode
|
kbd.release(k) # send keycode
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue