nadenislamarre Merci je suis un boulet...
Je fait mes tests en activant en suivant HAUT, BAS, GAUCHE, DROITE, BOUTON 1 et 2
Voici ce que j'obtiens =
login as: root
root@192.168.0.13's password:
evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0: Power Button
/dev/input/event1: Power Button
/dev/input/event2: Fintek LPC SuperIO Consumer IR Transceiver
/dev/input/event3: THT 1P arcade controller THT 1P arcade controller
/dev/input/event4: THT 1P arcade controller THT 1P arcade controller
/dev/input/event5: NOVATEK USB Keyboard
/dev/input/event6: NOVATEK USB Keyboard
/dev/input/event7: Video Bus
/dev/input/event8: HDA Intel PCH HDMI/DP,pcm=3
Select the device event number [0-8]: 3
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x16c0 product 0x5e0 version 0x111
Input device name: "THT 1P arcade controller THT 1P arcade controller"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 288 (BTN_TRIGGER)
Event code 289 (BTN_THUM😎
Event code 290 (BTN_THUMB2)
Event code 291 (BTN_TOP)
Event code 292 (BTN_TOP2)
Event code 293 (BTN_PINKIE)
Event code 294 (BTN_BASE)
Event code 295 (BTN_BASE2)
Event code 296 (BTN_BASE3)
Event code 297 (BTN_BASE4)
Event code 298 (BTN_BASE5)
Event code 299 (BTN_BASE6)
Event type 3 (EV_ABS)
Event code 0 (ABS_X)
Value 0
Min -1
Max 1
Event code 1 (ABS_Y)
Value 0
Min -1
Max 1
Event type 4 (EV_MSC)
Event code 4 (MSC_SCAN)
Properties:
Testing ... (interrupt to exit)
Event: time 1504014140.589866, type 3 (EV_ABS), code 1 (ABS_Y), value 1
Event: time 1504014140.589866, -------------- SYN_REPORT ------------
Event: time 1504014140.861835, type 3 (EV_ABS), code 1 (ABS_Y), value 0
Event: time 1504014140.861835, -------------- SYN_REPORT ------------
Event: time 1504014146.013828, type 3 (EV_ABS), code 0 (ABS_X), value 1
Event: time 1504014146.013828, -------------- SYN_REPORT ------------
Event: time 1504014146.349797, type 3 (EV_ABS), code 0 (ABS_X), value 0
Event: time 1504014146.349797, -------------- SYN_REPORT ------------
Event: time 1504014148.605813, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90001
Event: time 1504014148.605813, type 1 (EV_KEY), code 288 (BTN_TRIGGER), value 1
Event: time 1504014148.605813, -------------- SYN_REPORT ------------
Event: time 1504014148.749809, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90001
Event: time 1504014148.749809, type 1 (EV_KEY), code 288 (BTN_TRIGGER), value 0
Event: time 1504014148.749809, -------------- SYN_REPORT ------------
C#
export DISPLAY=0.0
sdl2-jstest --list
Unable to init SDL: No available video device
export DISPLAY=:0.0
sdl2-jstest --list
Found 2 joystick(s)
Joystick Name: 'THT 1P arcade controller THT 1P arcade controller'
Joystick Path: '/dev/input/event3'
Joystick GUID: 03000000c0160000e005000011010000
Joystick Number: 0
Number of Axes: 2
Number of Buttons: 12
Number of Hats: 0
Number of Balls: 0
GameController:
not a gamepad
Axis code 0: 0
Axis code 1: 1
Button code 0: 288
Button code 1: 289
Button code 2: 290
Button code 3: 291
Button code 4: 292
Button code 5: 293
Button code 6: 294
Button code 7: 295
Button code 8: 296
Button code 9: 297
Button code 10: 298
Button code 11: 299
Joystick Name: 'THT 1P arcade controller THT 1P arcade controller'
Joystick Path: '/dev/input/event4'
Joystick GUID: 03000000c0160000e005000011010000
Joystick Number: 1
Number of Axes: 2
Number of Buttons: 12
Number of Hats: 0
Number of Balls: 0
GameController:
not a gamepad
Axis code 0: 0
Axis code 1: 1
Button code 0: 288
Button code 1: 289
Button code 2: 290
Button code 3: 291
Button code 4: 292
Button code 5: 293
Button code 6: 294
Button code 7: 295
Button code 8: 296
Button code 9: 297
Button code 10: 298
Button code 11: 299
#
sdl2-jstest -e 0
Joystick Name: 'THT 1P arcade controller THT 1P arcade controller'
Joystick Path: '/dev/input/event3'
Joystick GUID: 03000000c0160000e005000011010000
Joystick Number: 0
Number of Axes: 2
Number of Buttons: 12
Number of Hats: 0
Number of Balls: 0
GameController:
not a gamepad
Axis code 0: 0
Axis code 1: 1
Button code 0: 288
Button code 1: 289
Button code 2: 290
Button code 3: 291
Button code 4: 292
Button code 5: 293
Button code 6: 294
Button code 7: 295
Button code 8: 296
Button code 9: 297
Button code 10: 298
Button code 11: 299
Entering joystick test loop, press Ctrl-c to exit
SDL_JOYDEVICEADDED which:0
SDL_JOYDEVICEADDED which:1
SDL_JOYAXISMOTION: joystick: 0 axis: 0 value: 32767 code: 0
SDL_JOYAXISMOTION: joystick: 0 axis: 0 value: 0 code: 0
SDL_JOYAXISMOTION: joystick: 0 axis: 1 value: 32767 code: 1
SDL_JOYAXISMOTION: joystick: 0 axis: 1 value: 0 code: 1
SDL_JOYBUTTONDOWN: joystick: 0 button: 0 state: 1 code:288
SDL_JOYBUTTONUP: joystick: 0 button: 0 state: 0 code:288
SDL_JOYBUTTONDOWN: joystick: 0 button: 1 state: 1 code:289
SDL_JOYBUTTONUP: joystick: 0 button: 1 state: 0 code:289
CRecieved interrupt, exiting
C
#
Merci pour ton aide