Skip to content

fix(hid-rp): Fix switch pro resetting counter#385

Merged
finger563 merged 1 commit intomainfrom
fix/switch-pro
Feb 25, 2025
Merged

fix(hid-rp): Fix switch pro resetting counter#385
finger563 merged 1 commit intomainfrom
fix/switch-pro

Conversation

@finger563
Copy link
Contributor

Description

  • Fix issue with switch pro hid report reset() resetting the counter value, which prevented increment_counter() from working
  • Update switch pro to clear all the report bytes to 0 ensuring subcommand / reply data is zeroed out
  • remove additional sets in the reset command so app can do it as necessary

Motivation and Context

Fixes an issue specifically with switch compatibility (ios/android didn't seem to care) if you wanted to simplify application code by calling increment_counter. This does not affect code that is already using set_counter after calling reset() of course.

How has this been tested?

Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Hardware (schematic, board, system design) change
  • Software change

Checklist:

  • My change requires a change to the documentation.
  • I have added / updated the documentation related to this change via either README or WIKI

Software

  • I have added tests to cover my changes.
  • I have updated the .github/workflows/build.yml file to add my new test to the automated cloud build github action.
  • All new and existing tests passed.
  • My code follows the code style of this project.

* Fix issue with switch pro hid report `reset()` resetting the counter value, which prevented `increment_counter()` from working
* Update switch pro to clear all the report bytes to 0 ensuring subcommand / reply data is zeroed out
* remove additional sets in the reset command so app can do it as necessary

Fixes an issue specifically with switch compatibility (ios/android didnt seem to care) if you wanted to simplify application code by calling `increment_counter`.

* Building and running https://github.com:/finger563/esp-usb-ble-hid with this code and doing longer play session with the switch
@finger563 finger563 self-assigned this Feb 25, 2025
@finger563 finger563 added bug Something isn't working hid hid-rp labels Feb 25, 2025
@finger563 finger563 merged commit ae75cab into main Feb 25, 2025
72 of 73 checks passed
@finger563 finger563 deleted the fix/switch-pro branch February 25, 2025 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working hid hid-rp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant