forked from mirrors/qmk_userspace
Implement relative mode for Cirque trackpad (#17760)
This commit is contained in:
parent
b085d5221b
commit
0b726a437b
7 changed files with 202 additions and 77 deletions
|
@ -21,24 +21,35 @@
|
|||
# define CIRQUE_PINNACLE_DIAMETER_MM 40
|
||||
#endif
|
||||
|
||||
#if CIRQUE_PINNACLE_POSITION_MODE
|
||||
// Coordinate scaling values
|
||||
#ifndef CIRQUE_PINNACLE_X_LOWER
|
||||
# define CIRQUE_PINNACLE_X_LOWER 127 // min "reachable" X value
|
||||
#endif
|
||||
#ifndef CIRQUE_PINNACLE_X_UPPER
|
||||
# define CIRQUE_PINNACLE_X_UPPER 1919 // max "reachable" X value
|
||||
#endif
|
||||
#ifndef CIRQUE_PINNACLE_Y_LOWER
|
||||
# define CIRQUE_PINNACLE_Y_LOWER 63 // min "reachable" Y value
|
||||
#endif
|
||||
#ifndef CIRQUE_PINNACLE_Y_UPPER
|
||||
# define CIRQUE_PINNACLE_Y_UPPER 1471 // max "reachable" Y value
|
||||
#endif
|
||||
#ifndef CIRQUE_PINNACLE_X_RANGE
|
||||
# define CIRQUE_PINNACLE_X_RANGE (CIRQUE_PINNACLE_X_UPPER - CIRQUE_PINNACLE_X_LOWER)
|
||||
#endif
|
||||
#ifndef CIRQUE_PINNACLE_Y_RANGE
|
||||
# define CIRQUE_PINNACLE_Y_RANGE (CIRQUE_PINNACLE_Y_UPPER - CIRQUE_PINNACLE_Y_LOWER)
|
||||
# ifndef CIRQUE_PINNACLE_X_LOWER
|
||||
# define CIRQUE_PINNACLE_X_LOWER 127 // min "reachable" X value
|
||||
# endif
|
||||
# ifndef CIRQUE_PINNACLE_X_UPPER
|
||||
# define CIRQUE_PINNACLE_X_UPPER 1919 // max "reachable" X value
|
||||
# endif
|
||||
# ifndef CIRQUE_PINNACLE_Y_LOWER
|
||||
# define CIRQUE_PINNACLE_Y_LOWER 63 // min "reachable" Y value
|
||||
# endif
|
||||
# ifndef CIRQUE_PINNACLE_Y_UPPER
|
||||
# define CIRQUE_PINNACLE_Y_UPPER 1471 // max "reachable" Y value
|
||||
# endif
|
||||
# ifndef CIRQUE_PINNACLE_X_RANGE
|
||||
# define CIRQUE_PINNACLE_X_RANGE (CIRQUE_PINNACLE_X_UPPER - CIRQUE_PINNACLE_X_LOWER)
|
||||
# endif
|
||||
# ifndef CIRQUE_PINNACLE_Y_RANGE
|
||||
# define CIRQUE_PINNACLE_Y_RANGE (CIRQUE_PINNACLE_Y_UPPER - CIRQUE_PINNACLE_Y_LOWER)
|
||||
# endif
|
||||
# if defined(POINTING_DEVICE_GESTURE_SCROLL_ENABLE)
|
||||
# define CIRQUE_PINNACLE_CIRCULAR_SCROLL_ENABLE
|
||||
# endif
|
||||
#else
|
||||
# define CIRQUE_PINNACLE_X_RANGE 256
|
||||
# define CIRQUE_PINNACLE_Y_RANGE 256
|
||||
# if defined(POINTING_DEVICE_GESTURE_SCROLL_ENABLE)
|
||||
# define CIRQUE_PINNACLE_SIDE_SCROLL_ENABLE
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(POINTING_DEVICE_TASK_THROTTLE_MS)
|
||||
# define POINTING_DEVICE_TASK_THROTTLE_MS 10 // Cirque Pinnacle in normal operation produces data every 10ms. Advanced configuration for pen/stylus usage might require lower values.
|
||||
|
@ -86,9 +97,9 @@ typedef struct {
|
|||
uint8_t buttonFlags;
|
||||
bool touchDown;
|
||||
#else
|
||||
uint8_t xDelta;
|
||||
uint8_t yDelta;
|
||||
uint8_t wheelCount;
|
||||
int16_t xDelta;
|
||||
int16_t yDelta;
|
||||
int8_t wheelCount;
|
||||
uint8_t buttons;
|
||||
#endif
|
||||
} pinnacle_data_t;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue