1
0
Fork 0

Cirque reachable calibration aide (#22803)

Co-authored-by: Stefan Kerkmann <karlk90@pm.me>
Co-authored-by: Johannes <you@example.com>
This commit is contained in:
JohSchneider 2024-01-13 08:28:09 +00:00 committed by GitHub
parent b659ef8278
commit 6b52c6d83d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 6 deletions

View file

@ -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;
}