Skip to content

Conversation

@maximkulkin
Copy link

Documentation states that get_last_received_report() function should
return None if there was no report received previously, otherwise it
should return report. Moreover, same report should be returned only
once. That makes it possible to reliably process incoming OUT/Feature
reports.

This patch adds an array that stores flags if report with particular
ID was received and updates get_last_received_report() to match its
documentation.

Backport from main to 7.3.x (see original PR #6767)

Documentation states that get_last_received_report() function should
return None if there was no report received previously, otherwise it
should return report. Moreover, same report should be returned only
once. That makes it possible to reliably process incoming OUT/Feature
reports.

This patch adds an array that stores flags if report with particular
ID was received and updates get_last_received_report() to match its
documentation.
Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I am a little worried this is a breaking change for 7.3.x, but since the documentation said it should work this way, so people should have coded for it, and the relevant library has been fixed to account for this behavior fix, I think this is OK to add to the next 7.3.x release.

@dhalbert dhalbert merged commit d13578f into adafruit:7.3.x Aug 25, 2022
@maximkulkin maximkulkin deleted the 7.3.x-usb-hid-get-last-report-fix branch August 25, 2022 12:29
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

Successfully merging this pull request may close these issues.

2 participants