[+] Guide BTN
This commit is contained in:
parent
457470fe52
commit
56b0d66022
1 changed files with 6 additions and 7 deletions
13
gpiopad.py
13
gpiopad.py
|
@ -80,13 +80,12 @@ while True:
|
||||||
if p1_select and GPIO.input(P1_BTN_SELECT): # select button released
|
if p1_select and GPIO.input(P1_BTN_SELECT): # select button released
|
||||||
p1_select = False
|
p1_select = False
|
||||||
device_p1.emit(uinput.BTN_SELECT, 0)
|
device_p1.emit(uinput.BTN_SELECT, 0)
|
||||||
# if (not p1_mode) and (not GPIO.input(P1_BTN_MODE)): # select button pressed
|
if (not p1_mode) and (not GPIO.input(P1_BTN_MODE)): # guide button pressed
|
||||||
# p1_mode = True
|
p1_mode = True
|
||||||
# device_p1.emit(uinput.BTN_MODE, 0)
|
device_p1.emit(uinput.BTN_MODE, 1)
|
||||||
# if p1_mode and GPIO.input(P1_BTN_SELECT): # select button released
|
if p1_mode and GPIO.input(P1_BTN_MODE): # guide button released
|
||||||
# p1_mode = False
|
p1_mode = False
|
||||||
# device_p1.emit(uinput.BTN_MODE, 1)
|
device_p1.emit(uinput.BTN_MODE, 0)
|
||||||
# Later implementation
|
|
||||||
if (not p1_fire1) and (not GPIO.input(P1_BTN_FIRE1)): # Fire1 button pressed
|
if (not p1_fire1) and (not GPIO.input(P1_BTN_FIRE1)): # Fire1 button pressed
|
||||||
p1_fire1 = True
|
p1_fire1 = True
|
||||||
device_p1.emit(uinput.BTN_SOUTH, 1)
|
device_p1.emit(uinput.BTN_SOUTH, 1)
|
||||||
|
|
Loading…
Reference in a new issue