Tactile
Fork of SeeedStudioTFTv2 by
Revision 14:08b37321bea6, committed 2016-03-15
- Comitter:
- pathae
- Date:
- Tue Mar 15 13:55:51 2016 +0000
- Parent:
- 13:362765fdf287
- Commit message:
- Tactile
Changed in this revision
| SeeedStudioTFTv2.cpp | Show annotated file Show diff for this revision Revisions of this file |
| SeeedStudioTFTv2.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/SeeedStudioTFTv2.cpp Tue May 06 18:12:49 2014 +0000
+++ b/SeeedStudioTFTv2.cpp Tue Mar 15 13:55:51 2016 +0000
@@ -41,10 +41,10 @@
_ym = ym;
// default touch calibration
// orientation // 0 1 2 3
- x_off = 108000; // 17252 16605 108755 108000
- y_off = 22000; // 22330 105819 97167 22000
- pp_tx = -291; // 378 289 -390 -291
- pp_ty = 356; // 261 -355 -239 356
+ x_off = 17252;// 17252 16605 108755 108000
+ y_off = 22330;// 22330 105819 97167 22000
+ pp_tx = 378 ; // 378 289 -390 -291
+ pp_ty = 261; // 261 -355 -239 356
}
void SeeedStudioTFTv2::setBacklight(bool enabled)
@@ -65,7 +65,7 @@
}
SeeedStudioTFTv2::TOUCH SeeedStudioTFTv2::getTouch(point& p)
-{
+{ int Xperso, Yperso;
int y2 = readTouch(_xp,_xm,_yp,_ym);
int x2 = readTouch(_yp,_ym,_xp,_xm);
int y1 = readTouch(_xp,_xm,_yp,_ym);
@@ -102,10 +102,10 @@
} else {
touch = YES;
}
- //locate(0,50);
- //printf("x: %6i y: %6i",p.x,p.y);
+ locate(0,20);
+ printf("x1: %6i",p.x);
return touch;
-}
+ }
void SeeedStudioTFTv2::calibrate(void)
{
@@ -133,6 +133,7 @@
for (i=0; i<5; i++) {
while (getTouch(p) != YES)
/*nothing*/;
+
a += p.x;
b += p.y;
}
@@ -182,6 +183,8 @@
}
while (getTouch(p) != NO)
/*nothing*/;
+ printf("on continu");
+ wait(5);
cls();
}
--- a/SeeedStudioTFTv2.h Tue May 06 18:12:49 2014 +0000
+++ b/SeeedStudioTFTv2.h Tue Mar 15 13:55:51 2016 +0000
@@ -71,7 +71,8 @@
*/
point toPixel(point p);
-protected:
+//protected:
+public:
PinName _xm;
PinName _ym;
PinName _xp;
