I am using:
Raspberry Pi Model B (Rev 1.0, 256Mb); cat /proc/cpuinfo returns for Revision 0002,
Raspbian Jessie with PIXEL (Version: November 2016, Release date: 2016-11-25, Kernel version: 4.4),
Java is preinstalled with Raspbian Jessie (java -version returns java version "1.8.0_65"),
JavaFX is by Gluon (JavaFX Embedded SDK 8.60.8),
Touchscreen is WAVESHARE 4inch Resistive Touch Screen LCD, HDMI interface, IPS Screen, Designed for Raspberry Pi, link: http://www.waveshare.com/wiki/4inch_HDMI_LCD,
Driver for touchscreen is installed by instructions on link in step 5.,
Touchscreen calibration for JavaFX application is by instructions: https://wiki.openjdk.java.net/display/OpenJFX/Touch+screen+calibration+on+embedded+platforms
Important notes:
Orientation for my touchscreen is set in /boot/config.txt as display_rotate=3 (270 degrees - landscape),
I tryed different combinations for minX, maxX, minY, maxY, flipXY and nothing helped me,
My JavaFX application is simple test application, where only one button is in center: https://i.stack.imgur.com/Q3R02.jpg
Top Left corner should have coordinates 0, 0 (corner at LAN conector),
and Bottom Right corner should have coordinates 800, 480,
axis x should be horizontal, axis y should be vertical,
My problem is that y axis is horizontal (range 0 - 479) and x axis is vertical (range 0 - 799) and flipXY don't work!
Touch on button in center of touchscreen not generate touch event along the length of button!
Note: swapxy=1 in /boot/config.txt don't work also!
Please, help me.
It's an old question, but for me the following combination of JVM parameters works:
-Dmonocle.input.0/0/0/0.minX=0
-Dmonocle.input.0/0/0/0.maxX=480
-Dmonocle.input.0/0/0/0.minY=480
-Dmonocle.input.0/0/0/0.maxY=-320
-Dmonocle.input.0/0/0/0.flipXY=true
In config.txt I specified only display_rotate=3
Related
I need to plot a real time signal, 140 points/sec, like an oscilloscope of sorts that traces 7 waves (20 values/sec each). It comes in as a UDP broadcast, this is the visualizer of the traffic. Ideally, this should "flow" to the side, like the output I currently get from the arduino IDE's serial monitor.
I plan to use Qt, which would give me both the networking AND the plotting. I will have an undecorated full-screen modal window (kiosk mode). Output is on an HDMI Touchscreen 1920 x 1080 (but I do not need to use the full surface for the plot, some 40% of it will be used by a GUI). I am thinking I could buffer the values and plot them out only 2-3 times/sec.
Problem is: I have a Raspberry Pi 3 for iron. Do you think a R.Pi can make it or am I just wasting my time with something too undersized for the job?.
I have an embedded Qt application that used to be able to interface with my touch-screen just fine using the EvdevTouch plugin but for some reason it has now started to alter the coordinates received from the driver in a very strange fashion.
In order for me to now get something close to the actual Y coordinate of a touch I have to calculate it as:
y = y + (y / 640 * 150)
I should mention though that this is actually the x coordinate coming from the screen because my scene is rotated 90 degrees.
I can confirm that the Linux driver is fine looking at the evtest output and when I run the application through xinput rather than evdevtouch then the coordinates are also correct. I don't want to use xinput though because it doesn't work as nice as EvdevTouch used to for multitouch.
PS. My Qt build is the latest one on the Jethro branch of meta-qt5 (5.5) for Yocto.
When I run my application on Set Top Box the font quality degrades. The degradation manifests itself as follows:
1. The letters in a word is not the same brightness, the pixels of one letter also differ in brightness;
2. Vertical Alignment moves down, in the worst case the bottom line bump on the top.
3. There is a feeling that used font is not I wanted (although the log indicates that the font that's what I need).
Most interestingly, it's fine in the desktop version of the same code, the same fonts.
Below are additional information about used enviroment and experiments that I done.
Fonts - TrueType, is loaded into the system using QFontDatabase :: addApplicationFont;
For PC: QT 5.2.1
For STB: QT 4.7.2
I use for fonts QFont :: PreferAntialias, setStretch (100)
I have replaced setPixelSize calls on setPointSize - did not help;
Suspecting QT version - made application for PC using qt 4.8 - for this version all are well;
I have played with different weights and sizes of font - used for this font information, which pulled via QFontDatabase. Did not help;
I have tested on different plasmas with different diagonal - one result.
The last thing I have learned - DPI. Here are DPI for my PC and STB:
Physical Logical
STB 72x72 72x72
PC 90x116 96x96
Well, perhaps all. If you help I will be very grateful.
I use Qt 4.8 in embedded linux. I want to change mouse cursor(QCursor) size, it's too small, but in QCursor class there is no function can change the size.
in Qt document: http://qt-project.org/doc/qt-4.8/qcursor.html#QCursor-3
it says here that:
Valid cursor sizes depend on the display hardware (or the underlying window system). We recommend using 32 x 32 cursors, because this size is supported on all platforms. Some platforms also support 16 x 16, 48 x 48, and 64 x 64 cursors.
so my question is: how to change the default cursor(QCursor) size in embedded linux ? I'm searching for answers on the Internet, almost no one mentioned this problem !?
(I know it can use QPixmap or QBitmap to change the cursor icon, but this is not the fundamental way.)
thanks.
Solved!
I cross compiled for Windows, and got my hint: The windows version crashed even before main -- so it had to be basic allocation issues. And it was. I had made a large static allocation and recently made it even larger (something the program requires, not optional or temporary); changed array[size] to array=calloc(etc,etc) and bingo, the windows version ran, and the crash deep in the bowels of OSX/Lion went away, everything runs fine again.
So, lesson learned: large static allocations, no good -- neither windows or OSX is particularly able to accommodate them.
I get a paint event. I have a QPixmap, standalone, that I will be drawing on a QWidget frame. Within the paint event call, I create a painter for the QPixmap, which lives in the class definition. I set colors; brushes, pens. I fill, I draw lines. rects. gradients. text. ellipses. it all works fine under Snow Leopard and Leopard. Under Lion, 10.7.anything, any drawText() call on this same QPixmap fails many call levels within OSX, and five levels deep in com.apple.ColorSync. Doesn't matter what font I use, or size. Both drawText() and drawStaticText() fail the same way.
The failure occurs prior to any attempt to actually draw the QPixmap -- it's during the render of the drawText() that it blows up. All I've done to that point is fill with black (works), fill with a gradient (works), draw some filled rects (works) and draw a grid (works) and then I go to draw this text. Which doesn't work, but blows out the main thread (0) (which is doing the drawing during the paint event) with EXC_BAD_ACCESS SIGSEGV.
Qt has no color management as far as I can tell. OSX has no way to turn off colorsync to the display.
For the moment, I've special cased the OS level and simply don't draw text (in the beta) if running under Lion but this is a horrible workaround.
Anyone have any ideas at all why Apple's 10.7 colorsync would get its knickers in a knot over drawText() to a perfectly vanilla QPixmap with valid size, text, rectangle, and within-bounds drawing task?