diff options
author | Andrew Hannam <andrewh@inmarket.com.au> | 2012-09-09 20:20:58 -0700 |
---|---|---|
committer | Andrew Hannam <andrewh@inmarket.com.au> | 2012-09-09 20:20:58 -0700 |
commit | 967f37dffeef55fbf66d8d166b287b68a143d975 (patch) | |
tree | 9913dce1b5577b8965ecb6cee68512c75d550691 /src/touchpad.c | |
parent | b8dcccb55142507c80128f5028e5edcad66760a6 (diff) | |
parent | b7791cc490d59bb029ca84e0b677923d9ec95aa7 (diff) | |
download | uGFX-967f37dffeef55fbf66d8d166b287b68a143d975.tar.gz uGFX-967f37dffeef55fbf66d8d166b287b68a143d975.tar.bz2 uGFX-967f37dffeef55fbf66d8d166b287b68a143d975.zip |
Merge pull request #6 from Tectu/master
Update from Tectu
Diffstat (limited to 'src/touchpad.c')
-rw-r--r-- | src/touchpad.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/touchpad.c b/src/touchpad.c index 44d5f426..5e81738b 100644 --- a/src/touchpad.c +++ b/src/touchpad.c @@ -196,11 +196,12 @@ uint16_t tpReadY(void) { } void tpCalibrate(void) { - uint16_t cross[2][2] = {{40,50}, {200, 280}}; + const uint16_t h = gdispGetHeight(); + const uint16_t w = gdispGetWidth(); + const uint16_t cross[2][2] = {{(w/8), (h/8)}, {(w-(w/8)) , (h-(h/8))}}; uint16_t points[2][2]; uint8_t i; - //gdispSetOrientation(portrait); gdispClear(Red); gdispFillStringBox(0, 10, gdispGetWidth(), 30, "Calibration", &fontUI2Double, White, Red, justifyCenter); |