esp-cpp / espp

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

fix(joystick): remove discontinuity at deadzone #230

Closed finger563 closed 1 month ago

finger563 commented 1 month ago

Description

Motivation and Context

Similar to #229 we should not have discontinuities when moving through the output range. This PR ensures that all values within the output range are possible, whereas before any value within the output range whose magnitude was less than the deadzone radius would be clipped and impossible.

How has this been tested?

Building and running on a device with a joystick and validating that the deadzone for the joystick still works, but values less than the deadzone radius are possible outputs.

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

Types of changes

Checklist:

Software

github-actions[bot] commented 1 month ago

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