diff options
author | JohSchneider <[email protected]> | 2024-01-13 08:28:09 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2024-01-13 00:28:09 -0800 |
commit | 6b52c6d83dafc80c65719947e307ee3795bd619c (patch) | |
tree | edbf5f46cfd36685cf551d72555ee42b98735630 /drivers | |
parent | b659ef8278815f48f17a4ecb89756bda0154734e (diff) | |
download | qmk_firmware-6b52c6d83dafc80c65719947e307ee3795bd619c.tar.gz qmk_firmware-6b52c6d83dafc80c65719947e307ee3795bd619c.zip |
Cirque reachable calibration aide (#22803)
Co-authored-by: Stefan Kerkmann <[email protected]>
Co-authored-by: Johannes <[email protected]>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/sensors/cirque_pinnacle.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/sensors/cirque_pinnacle.c b/drivers/sensors/cirque_pinnacle.c index b5c1abdebc..38e1fae3e3 100644 --- a/drivers/sensors/cirque_pinnacle.c +++ b/drivers/sensors/cirque_pinnacle.c @@ -331,6 +331,15 @@ pinnacle_data_t cirque_pinnacle_read_data(void) { result.wheelCount = ((int8_t*)data)[3]; #endif +#ifdef CIRQUE_PINNACLE_REACHABLE_CALIBRATION + static uint16_t xMin = UINT16_MAX, yMin = UINT16_MAX, yMax = 0, xMax = 0; + if (result.xValue < xMin) xMin = result.xValue; + if (result.xValue > xMax) xMax = result.xValue; + if (result.yValue < yMin) yMin = result.yValue; + if (result.yValue > yMax) yMax = result.yValue; + pd_dprintf("%s: xLo=%3d xHi=%3d yLo=%3d yHi=%3d\n", __FUNCTION__, xMin, xMax, yMin, yMax); +#endif + result.valid = true; return result; } |