diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-10-17 12:07:14 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-10-17 12:07:14 -0600 |
commit | 3585cc73d6f645bbf052e7411d52097f5b5b338a (patch) | |
tree | 350a020700b3e56bc18b86c3f2ef319a5da5a995 /NxWidgets/nxwm/include | |
parent | cfbd603eeb19635d391dfafb74deb06611c9486a (diff) | |
download | px4-nuttx-3585cc73d6f645bbf052e7411d52097f5b5b338a.tar.gz px4-nuttx-3585cc73d6f645bbf052e7411d52097f5b5b338a.tar.bz2 px4-nuttx-3585cc73d6f645bbf052e7411d52097f5b5b338a.zip |
New touchscreen scaling algorithm for the case where measured X values vary with y position (and vice versa)
Diffstat (limited to 'NxWidgets/nxwm/include')
-rw-r--r-- | NxWidgets/nxwm/include/ccalibration.hxx | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/NxWidgets/nxwm/include/ccalibration.hxx b/NxWidgets/nxwm/include/ccalibration.hxx index 30a48f7eb..d9cf3a7de 100644 --- a/NxWidgets/nxwm/include/ccalibration.hxx +++ b/NxWidgets/nxwm/include/ccalibration.hxx @@ -85,14 +85,36 @@ namespace NxWM * Touchscreen calibration data */ +#ifdef CONFIG_NXWM_CALIBRATION_ANISOTROPIC + struct SCalibrationLine + { + float slope; /**< The slope of a line */ + float offset; /**< The offset of a line */ + }; + struct SCalibrationData { - b16_t xSlope; // X conversion: xSlope*(x) + xOffset + struct SCalibrationLine left; /**< Describes Y values along left edge */ + struct SCalibrationLine right; /**< Describes Y values along right edge */ + struct SCalibrationLine top; /**< Describes X values along top */ + struct SCalibrationLine bottom; /**< Describes X values along bottom edge */ + nxgl_coord_t leftX; /**< Left X value used in calibration */ + nxgl_coord_t rightX; /**< Right X value used in calibration */ + nxgl_coord_t topY; /**< Top Y value used in calibration */ + nxgl_coord_t bottomY; /**< Bottom Y value used in calibration */ + }; + +#else + struct SCalibrationData + { + b16_t xSlope; /**< X conversion: xSlope*(x) + xOffset */ b16_t xOffset; - b16_t ySlope; // Y conversion: ySlope*(y) + yOffset + b16_t ySlope; /**< Y conversion: ySlope*(y) + yOffset */ b16_t yOffset; }; +#endif + /** * The CCalibration class provides the the calibration window and obtains * callibration data. |