helgeerbe / picframe

Picture frame viewer for raspi, controlled via mqtt and automatticly integrated as mqtt device in homeassistant.
MIT License
109 stars 31 forks source link

Menu Buttons With Touch Not Working #360

Open Ben10lightning opened 11 months ago

Ben10lightning commented 11 months ago

I have setup my picture frame with a usb touchscreen and a pi zero 2 w and the touch input mostly works except for the menu. I can touch the top of the screen to make the menu show up, however the buttons do nothing when I tap them. All other touch functionality works as expected. Here is the peripherals section of my configuration.yaml file

  input_type: "touch"        
  buttons:
    pause:                               
      enable: True                      
      label: "Pause"                    
      shortcut: " "                       
    display_off:                          
      enable: True                        
      label: "Display off"               
      enable: True                     
      label: "Exit"                     
      shortcut: "e"                       
    power_down:                           
      enable: True                      
      label: "Power down"                
      shortcut: "p"                     
helgeerbe commented 11 months ago

Hi,

unfortunately I don't own a touch screen and it's hard to say why this is not working. Which OS are you using? Is the touchscreen calibrated and works well, if you use the desktop and push browser buttons or so?

Ben10lightning commented 11 months ago

Didn't mean to close, I am using raspberry Pi OS Legacy 32 bit. The touchscreen works fine in the other parts of the OS and allows me to go to the next or previous picture without issue.

Ben10lightning commented 11 months ago

After more testing I believe I am having a similar issue to the one described in the known issues section of the peripherals page on the wiki. When I set the input method to mouse and try to use the touchscreen, the cursor position is not anywhere near where I am touching on the screen, even though in the desktop the cursor closely matches my finger position.

paddywwoof commented 11 months ago

With the move to SDL2 the whole pi3d mouse side might need to be reviewed, but if you are using legacy OS you are probably using the X11 system. i.e. not setting use_sdl2 in configuration.yaml

helgeerbe commented 11 months ago

Well, have you ever calibrated the touchscreen? https://forums.raspberrypi.com/viewtopic.php?t=358581

Maybe this will solve your issue.