project-owner / Peppy.doc

Peppy documentation
GNU General Public License v3.0
55 stars 16 forks source link

Issues with DSI-Touchscreen (Touch function) #15

Closed DrTron closed 2 years ago

DrTron commented 2 years ago

I really would like to use Peppy for my music player, but I can't seem to get the touchscreen to work right. The screen is a 5"-DSI-Touchscreen, as is the original 7"-Raspberry Touchscreen, and is connected with the same ribbon cable (no HDMI or such).

The display of Peppy is flawless, but touchscreen calibration is way off. It seems like it's a flip-x-y-problem, but setting "flip.touch.xy = True" in config.txt doesn't help. Touching the screen still activates the wrong controls.

I might add that the screen including the touch function works perfectly in other applications such as volumio, but the Raspberry Pi 2B I have dedicated for that is too slow for volumio...

Any ideas?

project-owner commented 2 years ago

Hi,

How did you install Peppy Player? Did you use the disk image for the Official 7" DSI display? What's the resolution of your 5" display? Is it the same 800x480 ?

I don't have any experience with non-official DSI displays. The support for the official one is based on the Python driver: https://github.com/pimoroni/python-multitouch https://github.com/project-owner/Peppy/blob/master/event/ft5406peppy.py I'm not sure that it works for any other DSI display. Though recently one guy installed Peppy on Pi with the Waveshare 5" DSI display: https://forums.raspberrypi.com/viewtopic.php?t=139983&start=350#p2017207 So, more likely it should work. Though I don't know the details.

You can try to play with rotation parameter in the file /boot/config.txt. For the official display it was set to:

lcd_rotate=2

You can try different values (0, 1, 3)

Best regards

DrTron commented 2 years ago

I used the Cezanne-image for the official 7"-Display (as that also uses DSI), but I tried before with Peppy about 6 months ago, and had the same issue. The resolution is also 800x480. Actually, I only chose this because it should behave the same as the official display and because the 7" was too big for my application.

The display reacts to touch, but I'll try setting different lcd_rotate values. But I'm afraid that'll rotate the whole screen content ;-)

DrTron commented 2 years ago

Changing the lcd_rotate values worked, thanks a lot! Now I just need to figure out how to prevent the screensaver from kicking in when playing, but that's a different topic...

project-owner commented 2 years ago

Great! To disable screensavers just set the property 'Screensaver Delay' to 'Off': https://github.com/project-owner/Peppy/blob/6284886bb1dfa0df556926826f8b1b2dcf6ad9fd/config.txt#L113

delay = delay.off

https://github.com/project-owner/Peppy.doc/wiki/Screensavers

Best regards

DrTron commented 2 years ago

I suppose that would disable the screensaver completely, however I'd like the screen to turn off when Peppy is not playing anything. I'll see if I can find something like that.

project-owner commented 2 years ago

There is no such option in the player.