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

fix: do not map root to ambiguous endpoint, opt-in with compat flag #2160

Merged
merged 4 commits into from
Mar 25, 2021

Conversation

AlCalzone
Copy link
Member

@AlCalzone AlCalzone commented Mar 25, 2021

With this PR, we no longer blindly map root endpoint reports to the first supporting endpoint. Unless the mapping is unambiguous, there's a good chance we'd get it wrong otherwise.

Instead, we now check if there's exactly one endpoint which supports the received CC. If so, the report gets mapped, otherwise it stays on the root endpoint. We can then go on a case-by-case basis and decide for which devices this report is actually needed and the root values need to be preserved.
Also, the new compat option mapRootReportsToEndpoints now determines if we even attempt mapping the report at all.

fixes: #2155
closes: #2156

@AlCalzone AlCalzone changed the title fix: do not perform ambiguous mapping of reports from root to endpoint fix: do not map root to ambiguous endpoint, opt-in with compat flag Mar 25, 2021
@AlCalzone AlCalzone merged commit c575440 into master Mar 25, 2021
@AlCalzone AlCalzone deleted the when-in-doubt-dont-map-report branch March 25, 2021 14:34
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.

1 participant