10typedef enum __attribute__((packed))
int32_t startRadius
Definition touchUtils.h:27
bool startSet
Definition touchUtils.h:25
int32_t lastRadius
Definition touchUtils.h:30
void getTouchCartesian(int32_t angle, int32_t radius, int32_t *x, int32_t *y)
Convert touchpad angle and radius to cartesian coordinates.
Definition touchUtils.c:18
int32_t spins
The number of complete CCW spins made. Negative indicates clockwise spins.
Definition touchUtils.h:32
touchJoystick_t getTouchJoystickZones(int32_t angle, int32_t radius, bool useCenter, bool useDiagonals)
Convert touchpad angle and radius to a joystick enum, with either 4 or 8 directions and an optional c...
Definition touchUtils.c:42
touchJoystick_t
Bitmask values for all the virtual joystick positions of getTouchJoystickZones()
Definition touchUtils.h:11
@ TB_UP_RIGHT
Definition touchUtils.h:17
@ TB_RIGHT
Definition touchUtils.h:13
@ TB_UP_LEFT
Definition touchUtils.h:18
@ TB_DOWN_RIGHT
Definition touchUtils.h:20
@ TB_LEFT
Definition touchUtils.h:15
@ TB_UP
Definition touchUtils.h:14
@ TB_DOWN
Definition touchUtils.h:16
@ TB_CENTER
Definition touchUtils.h:12
@ TB_DOWN_LEFT
Definition touchUtils.h:19
int32_t lastAngle
Definition touchUtils.h:29
int32_t startAngle
Definition touchUtils.h:26
int32_t remainder
The angle of the partial CCW spin, or negative for a CW spin.
Definition touchUtils.h:33
void getTouchSpins(touchSpinState_t *state, int32_t angle, int32_t radius)
Calculate the number of times the touchpad was circled.
Definition touchUtils.c:87
Definition touchUtils.h:24