Skip to content

TSC2007 X,Y in wrong orientation for TFT 2.4" FeatherWing V2 #5

Closed
@rimwolf-redux

Description

@rimwolf-redux

When I run the usage example from the adafruit_tsc2007 documentation on a TFT 2.4" FeatherWing V2 (controlled by an M4 Feather in my case), the point['y']value ranges from about 300 to 3600 as I move the touchpoint from left to right on the screen, and the point['x'] value ranges from about 3600 to 300 as I move the touchpoint from top to bottom. This is assuming the screen orientation that is established by using the screen initialization in the TFT 2.4" FeatherWing guide (ILI9341(display_bus, width=320, height= 240)), with the reset switch on the right hand edge and the Feather's USB plug at the top, and the (0,0) point in the upper left corner.

The point values are what one would expect if the screen were in portrait mode, with(0,0) point at the lower-left corner in this landscape orientation. Perhaps one way of addressing this issue is to provide an extra parameter to the TSC2007 initializer which indicates that a coordinate transform is necessary, which maps the (x, y) values in the touch result dict to (y, 4095-x), and documenting it accordingly in the FeatherWing's (as yet unprovided) V2 documentation. (Does the 3.5" FeatherWing have the same issue?)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions