waveshare-dtoverlays icon indicating copy to clipboard operation
waveshare-dtoverlays copied to clipboard

Waveshare 3.2 B touchscreen swapxy not working

Open marksluser opened this issue 9 years ago • 8 comments

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

marksluser avatar Jan 29 '17 12:01 marksluser

Thank you. I fixed the bug.

swkim01 avatar Jan 30 '17 16:01 swkim01

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

marksluser avatar Jan 30 '17 23:01 marksluser

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

swkim01 avatar Jan 31 '17 01:01 swkim01

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 avatar Mar 06 '17 10:03 DRAgon734465502

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

DRAgon734465502 avatar Mar 06 '17 19:03 DRAgon734465502

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

sm3rt avatar Apr 09 '18 11:04 sm3rt

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 avatar Dec 30 '22 17:12 apteryks

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).

apteryks avatar Jan 03 '23 05:01 apteryks