small cleanup

This commit is contained in:
Joel Bodenmann 2012-11-09 01:04:27 +01:00
parent 3dd0b1a5af
commit 61d2238b25
2 changed files with 7 additions and 4 deletions

View File

@ -53,6 +53,10 @@
#define TOUCHPAD_STORE_CALIBRATION FALSE #define TOUCHPAD_STORE_CALIBRATION FALSE
#endif #endif
#ifndef TOUCHPAD_VERIFY_CALIBRATION
#define TOUCHPAD_VERIFY_CALIBRATION FALSE
#endif
#ifndef TOUCHPAD_HAS_IRQ #ifndef TOUCHPAD_HAS_IRQ
#define TOUCHPAD_HAS_IRQ FALSE #define TOUCHPAD_HAS_IRQ FALSE
#endif #endif

View File

@ -108,9 +108,7 @@ static void _tpTransform(coord_t *x, coord_t *y) {
*y = (coord_t) (cal->ay * (*x) + cal->by * (*y) + cal->cy); *y = (coord_t) (cal->ay * (*x) + cal->by * (*y) + cal->cy);
} }
static void _tpDo3PointCalibration(const coord_t (*cross)[2], coord_t (*points)[2], static void _tpDo3PointCalibration(const coord_t (*cross)[2], coord_t (*points)[2], cal_t *c) {
cal_t *c)
{
float dx, dx0, dx1, dx2, dy0, dy1, dy2; float dx, dx0, dx1, dx2, dy0, dy1, dy2;
/* Compute all the required determinants */ /* Compute all the required determinants */
@ -281,7 +279,8 @@ coord_t tpReadY(void) {
#define MAX_CAL_SAMPLES 10 #define MAX_CAL_SAMPLES 10
/** /**
* @brief This function interactively performs calibration of the touchscreen * @brief Function to calibrate touchscreen
* @details This function interactively performs calibration of the touchscreen
* using 3-point calibration algorithm. Optionally, it also verifies * using 3-point calibration algorithm. Optionally, it also verifies
* the accuracy of the calibration coefficients obtained if the symbol * the accuracy of the calibration coefficients obtained if the symbol
* TOUCHPAD_VERIFY_CALIBRATION is defined in the configuration. * TOUCHPAD_VERIFY_CALIBRATION is defined in the configuration.