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

Got error when using setNonBlocking function #512

Open
SpiritLooper opened this issue May 27, 2023 · 2 comments
Open

Got error when using setNonBlocking function #512

SpiritLooper opened this issue May 27, 2023 · 2 comments

Comments

@SpiritLooper
Copy link

I want to set "non blocking mode" while reading data from my BuzzQuizz Wireless Controller and i have this error when i call the function hid.setNonBlocking(true) :

Error: Error in native callback
    at Object.<anonymous> (C:\Users\SpiritLooper\Documents\code\QuizzPartyGame\server\buzzerlib.js:8:5)    
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47

Node.js v18.16.0

This function work in version 1.3.2 but doesn't in the latest release (2.1.2).
I'm working on Windows 10 22H2

@Julusian
Copy link
Contributor

could you try doing hid.setNonBlocking(1)? It looks like it is expecting a numeric parameter

@SpiritLooper
Copy link
Author

SpiritLooper commented May 28, 2023

could you try doing hid.setNonBlocking(1)? It looks like it is expecting a numeric parameter

That works ! Maybe we could update the README file ?

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

2 participants