Update hid-rp-gamepad to use unit::degree() instead of hard-coded constant for better readability
Motivation and Context
Makes the code easier to understand and provides a better example for using hid-rp library rather than hard-coding the 0x0014 constant (0th nibble = system, 4 = english rotation; 1st nibble = length exponent, 1 = degrees).
How has this been tested?
Building and running the hid_service/example on a QtPy ESP32s3 and testing with iOS and Android.
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
[x] 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.
[x] All new and existing tests passed.
[x] My code follows the code style of this project.
Description
unit::degree()
instead of hard-coded constant for better readabilityMotivation and Context
Makes the code easier to understand and provides a better example for using hid-rp library rather than hard-coding the 0x0014 constant (0th nibble = system, 4 = english rotation; 1st nibble = length exponent, 1 = degrees).
How has this been tested?
Building and running the
hid_service/example
on a QtPy ESP32s3 and testing with iOS and Android.Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):
Types of changes
Checklist:
Software
.github/workflows/build.yml
file to add my new test to the automated cloud build github action.