- June 25, 2015 at 12:07 pm #4171TomMclaughlinParticipant
For the past while I have been trying to get a Qt5 program to cross compile from my linux laptop to my Rpi2 with a PiScreen. I seem to have run into 2 problems
1) to cross compile Qt onto the pi I needed to take the image from the SD card, copy it onto my laptop, mess with it, and then copy it back. Once I copy it back to the SD card, my touchscreen calibration is wrong. If I move the stylus right, the cursor goes down, left is up, up is left and down is right.
I have tried recalibrating it but that does not seems to be working. In fact it makes it worse.
Everything works fine if I attach a mouse
2) I am able to cross compile programs and execute them on my pi. However, they are only displayed through the HDMI port. I found a post in these threads about copying the HDMI output to the PiScreen, but it leaves the program choppy and the desktop underneath 'bleeds through'
Is there a way I can rotate the coordinates of the touchscreen so that it works properly again and also is there a way for me to get my program to change displays from the HDMI to the PiScreen?
Thank you for your time,June 25, 2015 at 12:39 pm #4172Mark WilliamsKeymaster
Have a look in
/etc/X11/xinit/xinitrcand see if there are any lines like this;
DISPLAY=:0 xinput --set-prop 'ADS7846 Touchscreen' 'Evdev Axes Swap' 1 DISPLAY=:0 xinput --set-prop 'ADS7846 Touchscreen' 'Evdev Axis Inversion' 1 1
If there are, delete them.
Then delete the calibration file and then reboot to run the calibration program again.
are you using fbcp? If so, this isn't really a good way to do it.. I consider this a sort of 'hack'.
I am not familiar with Qt. However, in your code.. can you force it to display the output on a given framebuffer? If so.. use framebuffer /dev/fb1
Mark --OzzMaker.com --April 13, 2016 at 10:12 am #4807TomMclaughlinParticipant
Thanks for your reply (took a little bit of a break)
I took a look into /etc/X11/xinit/xinitrc and didn't see what you were asking
I have been trying to use the framebuffers but have been having some trouble. I figured I could use the same approach as X windows and replaced what I found in
pi@raspberrypi ~ $ sudo nano /usr/share/X11/xorg.conf.d/99-fbturbo.conf
Section "Device" Identifier "PiSCreen" Driver "fbturbo" Option "fbdev" "/dev/fb1" EndSection
and then when I tried to get my program to launch I did this:
./myprogram -platform linuxfb LinuxFb:fb="/dev/fb1"
But am still not getting it to work. Any additional thoughts would be very welcome
- You must be logged in to reply to this topic.