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

HID report ID parameter cannot be changed (from default 0x01) #59

Open
francesco919 opened this issue Jan 28, 2024 · 0 comments
Open

HID report ID parameter cannot be changed (from default 0x01) #59

francesco919 opened this issue Jan 28, 2024 · 0 comments

Comments

@francesco919
Copy link

francesco919 commented Jan 28, 2024

Hello,
when trying to use a different HID report ID (default = 0x01), no report is received at host side.
this is due to an hardcoded value used during the HID report descriptor construction, ignoring the value passed by the user in the Joystick.init(uint8_t hidReportId, ...)

from joystick.cpp:
// REPORT_ID (Default: 1)
tempHidReportDescriptor[hidReportDescriptorSize++] = 0x85;
tempHidReportDescriptor[hidReportDescriptorSize++] = 0x01;

changing this to :
tempHidReportDescriptor[hidReportDescriptorSize++] = _hidReportId;
fixes the issue.

to be noted that in the library from Hieronimus the issue is not present being the code as the one showed as fix.
Note : Hieronimus uses 0x03 as default instead of 0x01 (joystick.h). Any reason behind the change?
#define JOYSTICK_DEFAULT_REPORT_ID 0x03

BR
Francesco

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