diff options
author | inmarket <andrewh@inmarket.com.au> | 2013-11-25 23:11:56 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2013-11-25 23:11:56 +1000 |
commit | 021f71445e77e0fbef7ff4dc78e0f6cc86a78968 (patch) | |
tree | 524e31684cb06986efa3442be63e079146f5fd06 /src/ginput | |
parent | c24ec8daf2f610c24dc8e6fd49be9b7022e9405e (diff) | |
download | uGFX-021f71445e77e0fbef7ff4dc78e0f6cc86a78968.tar.gz uGFX-021f71445e77e0fbef7ff4dc78e0f6cc86a78968.tar.bz2 uGFX-021f71445e77e0fbef7ff4dc78e0f6cc86a78968.zip |
Add support for edge to edge touch calibration.
Diffstat (limited to 'src/ginput')
-rw-r--r-- | src/ginput/mouse.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/ginput/mouse.c b/src/ginput/mouse.c index 1d2a314a..8166608a 100644 --- a/src/ginput/mouse.c +++ b/src/ginput/mouse.c @@ -428,16 +428,16 @@ bool_t ginputCalibrateMouse(uint16_t instance) { const coord_t height = gdispGGetHeight(MouseConfig.display); const coord_t width = gdispGGetWidth(MouseConfig.display); - #if 1 - const MousePoint cross[] = {{(width / 4), (height / 4)}, - {(width - (width / 4)) , (height / 4)}, - {(width - (width / 4)) , (height - (height / 4))}, - {(width / 2), (height / 2)}}; /* Check point */ - #else + #if GINPUT_MOUSE_CALIBRATE_EXTREMES const MousePoint cross[] = {{0, 0}, - {(width - 1) , 0}, - {(width - 1) , (height - 1)}, - {(width / 2), (height / 2)}}; /* Check point */ + {(width - 1) , 0}, + {(width - 1) , (height - 1)}, + {(width / 2), (height / 2)}}; /* Check point */ + #else + const MousePoint cross[] = {{(width / 4), (height / 4)}, + {(width - (width / 4)) , (height / 4)}, + {(width - (width / 4)) , (height - (height / 4))}, + {(width / 2), (height / 2)}}; /* Check point */ #endif MousePoint points[GINPUT_MOUSE_CALIBRATION_POINTS]; const MousePoint *pc; |