diff options
author | mobyfab <mobyfab@free.fr> | 2012-11-10 17:10:19 +0100 |
---|---|---|
committer | mobyfab <mobyfab@free.fr> | 2012-11-10 17:10:19 +0100 |
commit | 1ba2539b6c11402835e4f8554678f0c0e64dfbc1 (patch) | |
tree | 80cb962a965f7b39303b2c4a45ef978071b1145d | |
parent | 5f903622616a2f1686f3124bf56dd69479fd9454 (diff) | |
download | uGFX-1ba2539b6c11402835e4f8554678f0c0e64dfbc1.tar.gz uGFX-1ba2539b6c11402835e4f8554678f0c0e64dfbc1.tar.bz2 uGFX-1ba2539b6c11402835e4f8554678f0c0e64dfbc1.zip |
Adding TOUCHSCREEN_XY_INVERTED define to the calibration function.
-rw-r--r-- | src/touchscreen.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/touchscreen.c b/src/touchscreen.c index d7abbe30..8f403d4e 100644 --- a/src/touchscreen.c +++ b/src/touchscreen.c @@ -324,9 +324,14 @@ calibrate: while(j < MAX_CAL_SAMPLES) {
if(tsPressed()) {
/* We have valid pointer data */
+
+#if TOUCHSCREEN_XY_INVERTED == TRUE
+ py += _tsReadRealX();
+ px += _tsReadRealY();
+#else
px += _tsReadRealX();
py += _tsReadRealY();
-
+#endif
j++;
}
}
|