Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of DMBasicGUI by
Diff: Application/AppTouchCalibration.cpp
- Revision:
- 3:3fabfe3339b8
- Parent:
- 1:46c8df4608c8
- Child:
- 4:a73760d09423
--- a/Application/AppTouchCalibration.cpp Fri Dec 19 07:37:24 2014 +0000
+++ b/Application/AppTouchCalibration.cpp Fri Dec 19 09:12:51 2014 +0100
@@ -187,13 +187,14 @@
swim_set_pen_color(_win, BLACK);
TouchPanel::touchCoordinate_t coord;
while(!done) {
- _touch->read(coord);
- if (coord.z > 0) {
- //swim_put_pixel(_win, coord.x, coord.y);
- swim_put_box(_win, coord.x-1, coord.y-1, coord.x+1, coord.y+1);
- }
- if (_btn->handle(coord.x, coord.y, coord.z > 0)) {
- _btn->draw();
+ if (_touch->read(coord) == TouchPanel::TouchError_Ok) {
+ if (coord.z > 0) {
+ //swim_put_pixel(_win, coord.x, coord.y);
+ swim_put_box(_win, coord.x-1, coord.y-1, coord.x+1, coord.y+1);
+ }
+ if (_btn->handle(coord.x, coord.y, coord.z > 0)) {
+ _btn->draw();
+ }
}
}
