Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xbox old gamepad #12

Open
metropolicon opened this issue Dec 28, 2023 · 0 comments
Open

xbox old gamepad #12

metropolicon opened this issue Dec 28, 2023 · 0 comments

Comments

@metropolicon
Copy link

hello...
trying to use with n old xbox gamepad (1st generation xbox)

jstest result :
Joystick (Microsoft X-Box pad v2 (US)) has 8 axes (X, Y, Z, Rx, Ry, Rz, Hat0X, Hat0Y) and 10 buttons (BtnA, BtnB, BtnC, BtnX, BtnY, BtnZ, BtnSelect, BtnStart, BtnThumbL, BtnThumbR).

but when i launch your pendant, got his error :
(i've added just before problem my own log.debug (log.debug("--->",id,",",a,",",b);)
as you can see a and b variable are undefined....:(

`CNCpad debug ---> AXIS_Y , undefined , undefined
file:///root/cncjs-pendant-streamdeck-main/cncjs-pendant-gamepad/lib/actions.js:58
const deadmanSlow = b.KEYCODE_BUTTON_L1 || b.KEYCODE_BUTTON_R1;
^

TypeError: Cannot read properties of undefined (reading 'KEYCODE_BUTTON_L1')
at Actions.onUse (file:///root/cncjs-pendant-streamdeck-main/cncjs-pendant-gamepad/lib/actions.js:58:31)
at EventEmitter.emit (node:events:514:28)
at GamepadController.gamepadEventMove (file:///root/cncjs-pendant-streamdeck-main/cncjs-pendant-gamepad/lib/gamepad_controller.js:241:25)
at EventEmitter.emit (node:events:514:28)
at GamepadController.gamepad.context.on (file:///root/cncjs-pendant-streamdeck-main/cncjs-pendant-gamepad/lib/gamepad_controller.js:138:31)
at listOnTimeout (node:internal/timers:573:17)
at process.processTimers (node:internal/timers:514:7)

Node.js v20.10.0
`
can you help me ?
thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant