esp-cpp / espp

C++ components for ESP
https://esp-cpp.github.io/espp/
MIT License
28 stars 9 forks source link

feat(hid-rp): update gamepad to support joystick/trigger storage type specification #237

Closed finger563 closed 1 month ago

finger563 commented 1 month ago

Description

Motivation and Context

Previously the storage type was implicitly uint16_t and the min/max values were also uint16_t, but sometimes (and for some platforms) you may want to support negative ranges or you may want to only use one byte for joystick or triggers. This PR updates the class so you can specify such implementations.

How has this been tested?

Building and running the hid-rp/example and the hid_service/example on a QtPy ESP32s3. Tested the hid_service/example with Android and iOS.

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

CleanShot 2024-05-16 at 16 25 07

Types of changes

Checklist:

Software

github-actions[bot] commented 1 month ago

:white_check_mark:Static analysis result - no issues found! :white_check_mark: