adafruit / Adafruit_STMPE610

Arduino library for STMPE610/811 resistive touch screen controllers
MIT License
38 stars 32 forks source link

touch screen init is extremely cumbersome, confusing and ambiguous depending on chosen portrait or landscape format #16

Closed dsyleixa closed 5 years ago

dsyleixa commented 5 years ago

I am using a Adafruit Feather M4 plus TFT Featherwing HX3857 (3.5")

The touch screen init is extremely cumbersome, confusing, and ambiguous depending on chosen portrait or landscape format.

Once having found the correct set of #defines for TS_MINX TS_MAXX TS_MINY TS_MAXY it works then stable, but just for that setting, not for any different one when changing to either portrait or landscape format.

So I always have to fiddle around with different settings until I'll coincidentally find the right one to start with, and that fails completely when changing the portrait or landscape modes during runtime:

can't that be made automatically detectable after once having set tft.setRotation(mode); when changing mode arbitrarily in the source code during runtime?

// Touch Calibration
/*
#define TS_MINX 3800
#define TS_MAXX 100
#define TS_MINY 100
#define TS_MAXY 3750
*/
#define TS_MINX 100
#define TS_MAXX 3800
#define TS_MINY 3750
#define TS_MAXY 100

 /*
 #define TS_MINX 150
 #define TS_MINY 130
 #define TS_MAXX 3800
 #define TS_MAXY 4000 
*/
ptorrone commented 5 years ago

feedback, got it.

dsyleixa commented 5 years ago

I was requested by ladyada to open this issue in this repo, after first having posted it in the GFX repo. https://github.com/adafruit/Adafruit-GFX-Library/issues/213#issuecomment-489388198 So why do you close it? it is not resolved yet!

ptorrone commented 5 years ago

got the feedback, closing it out for now - will reopen if there are any updates.