diff options
author | Dasky <32983009+daskygit@users.noreply.github.com> | 2021-12-31 03:27:51 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-30 19:27:51 -0800 |
commit | 3b4d5390f2c203b97d1f1c0b542d0f5cd0cfd5c7 (patch) | |
tree | d54e32f511be3b3392da094411d09f9c97df6893 /drivers | |
parent | c4551d7ef1ed2c1069f23cc8499b7c7fc30f3ecf (diff) | |
download | qmk_firmware-3b4d5390f2c203b97d1f1c0b542d0f5cd0cfd5c7.tar.gz qmk_firmware-3b4d5390f2c203b97d1f1c0b542d0f5cd0cfd5c7.zip |
[Bug] Fix analog joystick to mouse compilation (#15677)
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/sensors/analog_joystick.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/sensors/analog_joystick.c b/drivers/sensors/analog_joystick.c index 0f4d1d7a4..1666bed04 100644 --- a/drivers/sensors/analog_joystick.c +++ b/drivers/sensors/analog_joystick.c | |||
@@ -30,7 +30,7 @@ int16_t xOrigin, yOrigin; | |||
30 | 30 | ||
31 | uint16_t lastCursor = 0; | 31 | uint16_t lastCursor = 0; |
32 | 32 | ||
33 | int16_t axisCoordinate(uint8_t pin, uint16_t origin) { | 33 | int16_t axisCoordinate(pin_t pin, uint16_t origin) { |
34 | int8_t direction; | 34 | int8_t direction; |
35 | int16_t distanceFromOrigin; | 35 | int16_t distanceFromOrigin; |
36 | int16_t range; | 36 | int16_t range; |
@@ -60,7 +60,7 @@ int16_t axisCoordinate(uint8_t pin, uint16_t origin) { | |||
60 | } | 60 | } |
61 | } | 61 | } |
62 | 62 | ||
63 | int8_t axisToMouseComponent(uint8_t pin, int16_t origin, uint8_t maxSpeed) { | 63 | int8_t axisToMouseComponent(pin_t pin, int16_t origin, uint8_t maxSpeed) { |
64 | int16_t coordinate = axisCoordinate(pin, origin); | 64 | int16_t coordinate = axisCoordinate(pin, origin); |
65 | if (coordinate != 0) { | 65 | if (coordinate != 0) { |
66 | float percent = (float)coordinate / 100; | 66 | float percent = (float)coordinate / 100; |