Tactile
Fork of SeeedStudioTFTv2 by
Diff: SeeedStudioTFTv2.cpp
- Revision:
- 14:08b37321bea6
- Parent:
- 10:b55a7f8d1145
--- 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(); }