Reconstruction logic for padding bytes at the end of Reports (only possible for devices without ReportID) #707

Merged
JoergAtGithub merged 2 commits from pading_bytes_for_reports_without_id into master 2024-10-30 10:30:14 -05:00
JoergAtGithub commented 2024-10-27 13:34:57 -05:00 (Migrated from github.com)
  • Added reconstruction logic of const padding bytes at the end of a report for devices which don't use ReportIDs
  • Enhanced padding logic to distinguish between byte and bit padding.
  • Added a new test case for Razer Cobra mouse 1532_00A3_0002_0001 which has a completly con feature report of 90 bytes.
  • Modified expected report descriptor reference file 045E_02FF_0005_0001_expected.rpt_desc to include additional padding bytes.

Closes: #703

- Added reconstruction logic of const padding bytes at the end of a report for devices which don't use ReportIDs - Enhanced padding logic to distinguish between byte and bit padding. - Added a new test case for Razer Cobra mouse `1532_00A3_0002_0001` which has a completly con feature report of 90 bytes. - Modified expected report descriptor reference file `045E_02FF_0005_0001_expected.rpt_desc` to include additional padding bytes. Closes: #703
Youw (Migrated from github.com) reviewed 2024-10-28 07:28:23 -05:00
@ -537,7 +537,10 @@ int hid_winapi_descriptor_reconstruct_pp_data(void *preparsed_data, unsigned cha
}
Youw (Migrated from github.com) commented 2024-10-28 07:28:23 -05:00
		// Windows pp_data are per top-level collection, therefore top level coll end is unique
```suggestion // Windows pp_data are per top-level collection, therefore top level coll end is unique ```
Youw commented 2024-10-29 04:00:14 -05:00 (Migrated from github.com)

If someone could test/verify this - I'll approve/merge.

If someone could test/verify this - I'll approve/merge.
mcuee commented 2024-10-29 05:18:12 -05:00 (Migrated from github.com)

Not sure if I have test devices which can test the improvement in this PR. Still I will check with my existing devices to see if there are any differences.

Not sure if I have test devices which can test the improvement in this PR. Still I will check with my existing devices to see if there are any differences.
SuibianP (Migrated from github.com) approved these changes 2024-10-30 05:51:38 -05:00
SuibianP (Migrated from github.com) left a comment

Tested with 1532:00A3. hid_report_reconstructor_test adds the last const report correctly.

Tested with 1532:00A3. `hid_report_reconstructor_test` adds the last const report correctly.
Youw (Migrated from github.com) approved these changes 2024-10-30 10:29:42 -05:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-libusb/hidapi!707
No description provided.