aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoel Bodenmann <joel.bodenmann@hevs.ch>2012-10-23 06:19:18 +0200
committerJoel Bodenmann <joel.bodenmann@hevs.ch>2012-10-23 06:19:18 +0200
commit0685eb445a12acb7ff15b900e21a8590b64e891f (patch)
treeb10bf10b7d4c294bd51e64e3f3b5125329b0c56c /src
parent9379d17303bfa982e2a144e1965b47de74729802 (diff)
downloaduGFX-0685eb445a12acb7ff15b900e21a8590b64e891f.tar.gz
uGFX-0685eb445a12acb7ff15b900e21a8590b64e891f.tar.bz2
uGFX-0685eb445a12acb7ff15b900e21a8590b64e891f.zip
touchpad calibration storage update
Diffstat (limited to 'src')
-rw-r--r--src/touchpad.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/touchpad.c b/src/touchpad.c
index 7cca237b..ee0bac77 100644
--- a/src/touchpad.c
+++ b/src/touchpad.c
@@ -50,10 +50,6 @@ extern struct cal_t *lld_tpReadCalibration(void);
/*===========================================================================*/
static struct cal_t *cal;
-#if TOUCHPAD_STORE_CALIBRATION
-static bool_t calibration_failed = FALSE;
-#endif
-
/*===========================================================================*/
/* Driver local functions. */
/*===========================================================================*/
@@ -150,7 +146,6 @@ void tpInit(const TOUCHPADDriver *tp) {
cal = lld_tpReadCalibration();
if(cal == NULL) {
cal = (struct cal_t*)chHeapAlloc(NULL, sizeof(struct cal_t));
- calibration_failed = TRUE;
tpCalibrate();
}
#endif
@@ -248,8 +243,7 @@ void tpCalibrate(void) {
cal->yn = (float)cross[0][1] - cal->ym * (float)points[0][1];
#if TOUCHPAD_STORE_CALIBRATION
- if(!calibration_failed)
- lld_tpWriteCalibration(cal);
+ lld_tpWriteCalibration(cal);
#endif
}