diff --git a/keyboards/yowkees/lib/keyball/keyball.c b/keyboards/yowkees/lib/keyball/keyball.c index c560cab6eaf..abac56b6772 100644 --- a/keyboards/yowkees/lib/keyball/keyball.c +++ b/keyboards/yowkees/lib/keyball/keyball.c @@ -25,7 +25,11 @@ along with this program. If not, see . #include const uint8_t CPI_DEFAULT = KEYBALL_CPI_DEFAULT / 100; -const uint8_t CPI_MAX = pmw3360_MAXCPI + 1; +/** + * The Keyball library uses a range of 0 <= cpi <= 119 internally, and the true + * CPI value is ( cpi + 1 ) * 100. + */ +const uint8_t CPI_MAX = KEYBALL_PMW3360_MAXCPI + 1; // 119 + 1 = 12000 CPI actual const uint8_t SCROLL_DIV_MAX = 7; const uint16_t AML_TIMEOUT_MIN = 100; diff --git a/keyboards/yowkees/lib/keyball/keyball.h b/keyboards/yowkees/lib/keyball/keyball.h index 32003a84632..cb54241f46c 100644 --- a/keyboards/yowkees/lib/keyball/keyball.h +++ b/keyboards/yowkees/lib/keyball/keyball.h @@ -49,6 +49,10 @@ along with this program. If not, see . # define KEYBALL_SCROLLSNAP_TENSION_THRESHOLD 12 #endif +#ifndef KEYBALL_PMW3360_MAXCPI +# define KEYBALL_PMW3360_MAXCPI 119 // 12000 CPI actual +#endif + /// Specify SROM ID to be uploaded PMW3360DW (optical sensor). It will be /// enabled high CPI setting or so. Valid valus are 0x04 or 0x81. Define this /// in your config.h to be enable. Please note that using this option will