c est celui ci le poirier

Dependencies:   SPI_TFT_ILI9341

Fork of SeeedStudioTFTv2 by Michael Ammann

Files at this revision

API Documentation at this revision

Comitter:
xpoirier
Date:
Fri Nov 27 09:28:04 2015 +0000
Parent:
11:f2aaffad7d38
Commit message:
poirier

Changed in this revision

SeeedStudioTFTv2.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/SeeedStudioTFTv2.cpp	Wed Oct 23 01:37:11 2013 +0000
+++ b/SeeedStudioTFTv2.cpp	Fri Nov 27 09:28:04 2015 +0000
@@ -35,16 +35,16 @@
     bl = 1;
     font = NULL;
     // touch screen pins
-    _xp = xp;
-    _yp = yp;
-    _xm = xm;
-    _ym = ym;
+    _xp = yp;
+    _yp = xp;
+    _xm = ym;
+    _ym = xm;
     // 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 = 16605;  //  17252  16605 108755 108000
+    y_off =  105819;  //  22330 105819  97167  22000
+    pp_tx =   289;  //    378    289   -390   -291
+    pp_ty =    -355;  //    261   -355   -239    356
 }
 
 void SeeedStudioTFTv2::setBacklight(bool enabled)
@@ -102,8 +102,8 @@
     } else {
         touch = YES;
     }
-    //locate(0,50);
-    //printf("x: %6i y: %6i",p.x,p.y);
+    locate(0,50);
+    //printf("x: %d y: %d",p.x,p.y);//printf("x: %6i y: %6i",p.x,p.y);
     return touch;
 }
 
@@ -121,10 +121,13 @@
     if (font)
     {
         // get the center of the screen
-        pos_x = columns() / 2 - 3;
-        pos_x = pos_x * font[1];
-        pos_y = (rows() / 2) - 1;
-        pos_y = pos_y * font[2];
+       pos_x = columns() / 2 - 3;
+    pos_x = pos_x * font[1];
+      pos_y = (rows() / 2) - 1;
+     pos_y = pos_y * font[2];
+        
+
+  
         locate(pos_x,pos_y);
         printf("press cross    ");
         locate(pos_x,pos_y + font[2]);