swkim01 / waveshare-dtoverlays

WaveShare SpotPear 3.2" and 3.5/4.0" TFT LCD overlays for the Raspberry PI and PI 2
GNU General Public License v3.0
184 stars 66 forks source link

Waveshare 3.2 B touchscreen swapxy not working #14

Open msluser opened 7 years ago

msluser commented 7 years ago

I am trying to swap the touchscreen x and y. In my config.txt file I try dtoverlay=waveshare32b:swapxy=1

however It does not work.

Looking at the Waveshare 3.2 B DTS file I see: swapxy = <&waveshare32b_ts>,"swap-xy?"; I believe it should be swapxy = <&waveshare32b_ts>,"ts,swap-xy?";

I tried to compile the dts file using the dtc compiler and received some warinings.

What settings did you use to compile the dts file to a dtb ?

Thank you,

-Mark

swkim01 commented 7 years ago

Thank you. I fixed the bug.

msluser commented 7 years ago

What was the command you used to compile the dts file?

I trieed to compile it using dtc -I dts -O dtb -o waveshare32b.dtbo waveshare32b.dts

swkim01 commented 7 years ago

I used the following as to https://github.com/notro/fbtft/wiki/FBTFT-RPI-overlays. dtc -@ -I dts -O dtb -o waveshare32b-overlay.dts waveshare32b.dts

DRAgon734465502 commented 7 years ago

The lastest raspbian OS have updated to 2017-03-02-raspbian-jessie

But the touch can not work well ,I use waveshare 3.5inch LCD with ads7846/xpt2046

The calibration file 99-calibration.conf can not work well, seem the file have stopped to work but it can work well at old version Raspbian

the Touch reverse, touch X axis but go to Y axis

please help me , I am very urgent

DRAgon734465502 commented 7 years ago

This driver can not run at 2017-03-02-raspbian-jessie, touch error

sm3rt commented 6 years ago

Hi any updates on this? The touch is still reversed. swap XY does work but then the Y is still reversed. Any ideas please?

Apteryks commented 1 year ago

I confirm that even without rotating the waveshare35b-v2 screen, its touchscreen default configuration is off (x => y and y => -x). It's probably fixable via a the CalibrationMatrix libinput option via a Xorg config file (see: https://www.waveshare.com/wiki/3.5inch_DPI_LCD) but it'd be nicer if it worked correctly out of the box.

Apteryks commented 1 year ago

I've finally understood what was causing my confusion. The screen is by default rotated 90 degrees in the counter-clockwise direction, but the touchscreen axes are untouched. So the X-Y axes need to be swapped (with swapxy=1) and the y axis needs to be inverted (no current way to do this in the dt overlay, but see: https://github.com/swkim01/waveshare-dtoverlays/pull/40).