Application does not display anything on LCD on arm board - qt

I have cross compiled Qt 4.7.4 for an ARM board successfully.
I have created a sample Qt application for an ARM board and cross compiled that as well.
When I run the app on the actual hardware, I do not see the UI on the LCD screen (but could see the logs provided using qDebug).
At this point, if I reboot the board, the UI of the sample app becomes visible for a second, just before the screen turns off, due to the reboot.
Do you have any suggestions regarding this problem. What could be the possible causes for this?
Regards,
Mohan

I did solve this problem.
Need to change the backlight intensity. Set it to the maximum and UI is visible on the LCD screen.
No changes/update required anything related to Qt.

Related

Cannot find Arduino IDE VS Code

I am using windows and I installed the Arduino IDE from Microsoft store, but I wanted to code everything in VS Code. When I want to run the program or select the board it just says this:
Cannot find Arduino IDE. Please specify the "arduino.path" in the user settings. Requires a restart after change.
How can I fix this, where can I find the arduino.path?
Install PlatformIO extension for VS Code. It has Arduino framework and it works with all possible boards, and then some.
For me nothing could make Arduino IDE.app (2.0 beta) work. Switching to 1.8.6 (Arduino.app), putting that into my Applications folder (so the path is /Applications/Arduino.app) and setting the VSCode setting to:
"arduino.path": "/Applications/Arduino.app"
Fixed this error (and got me to select a board, which I was able to do with the command palette. Make sure to open the new non-beta Arduino.app and add any existing board manager jsons, such as esp32 in my case, that might have already been added to the beta Arduino. The libraries appear to already be in place.)
I also had to add this to my C/C++ settings for includePath:
${workspaceFolder}/**
/Users/<owen>/Library/Arduino15/packages/esp32/hardware/esp32/1.0.6/**
At this point "verify" began working. It was still pretty slow, and flashes the Arduino splash screen while running, so I'm now going to follow the platformIO advice and see if it's any better.
P.S. At first I also got an error about [Warning] Failed to generate IntelliSense configuration but think I fixed this by clicking the "don't show again" or similar on the popup that appeared in the lower left. (Similar errors show up on syntax issues, so could be related to that instead.)

STM32 Cube IDE (True Studio) Connect under Reset

I just tried out the new STM32 Cube IDE, which based on Atollic True Studio which based on Eclipse.
Looks good, Cube MX is integraded but the Debugger / ST-Link Intigration made problems by me.
If I flash a MCU for first time, it works pretty well. But on next time, the IDE says
"Target no device found
Error in initializing ST-LINK device.
Reason: No device found on target."
I found out that the ST-Link V2 with my Hardware need a "Connect under Reset".
With the ST-Link Utility it works fine, but in Cube IDE I cant find that point to set up.
Here is the Config Form: IDE
Can anyone assist?
I found the problem of the code, why the upload just works one time after full erase:
Cube IDE generate the HAL_MspInit() in ..stm32f1xx_hal_msp.c which contains:
__HAL_AFIO_REMAP_SWJ_DISABLE();
With that all debug stuff will be disabled after first flash.
With changing this line to:
__HAL_AFIO_REMAP_SWJ_NOJTAG();
The Debug mode works fine and several times in a row.
With version up to v1.0.1 it is not possible to connect under reset with STM32CubeIDE from GUI.
The reason(s) why you are having the issue could be:
You are using low-power features where CPU is halted
You are overwriting default alternate function setup for SWDIO and SWCLK pins (PA13 and PA14).
If you need to use Connect under reset, use STM32CubeProgrammer for flashing. Even better, try not to use sleep modes or do not overwrite flashing GPIOs for the test.

black screen flicker after starting QT linux application?

I used embedded linux (imx6q) with eglfs.
Framebuffer is drawing black screen while starting Qt application.
Simple application is black for 1sec under. Heavy application is for 4~5sec.
This happens only once when first QT run.
How to prevent qt from drawing to black? I can modify kernel or QT sources.
i am looking for qt and kernel source (related framebuffer blank, switch mode).
but, i have no idea. help me.
I already posted it on the qt forum, but there is no response.
Additional edits>
I think it only happens where using Linux framebuffer.
And it seems that the QT framework takes time to load the first one-time QML modules into the system.
After that, It use cached ones, so I wonder if there is flickr for a very short period of time.
The unavoidable loading time is fine.
But I want to prevent the QT system from erasing the framebuffer in black.

Why Qt can not capture touch event after re-plug USB touch device?

Have a good day.
I have a problem about touch device's hot-plug.
I set the environment variable as below.
export QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=/dev/input/ts_uinput:rotate=0
The "/dev/input/ts_uinput" is created by ts library's application "ts_uinput".
The touch function can work normally before I re-plug the USB touch device.
If I re-plug the USB touch device, the touch function doesn't work.
The "/dev/input/ts_uinput" still is created after I re-plug the USB touch device.
I also monitor the data in "/dev/input/ts_uinput" and it also has data report.
Why the Qt does not get the touch event after re-plug the USB touch device?
I would boldly guess that this is because Qt (the Qt evdev platform plugin) opens /dev/input/ts_uinput when the app start. When you replug the touch device, the file is recreated but the file handle held by Qt has become invalid. Making it work again would require Qt to close and reopen the handle.
You could try getting more info by enabling debug logs: http://doc.qt.io/qt-5/embedded-linux.html#debugging-input-devices
However, I do not know if this is a bug or a missing feature, you might want to contact the Qt interest mailing list or report a bug.

Turn on GPS when App starts in QT

So I was working on a positioning app which needs GPS to be turned on. So I wanted a way to automatically turn on GPS in the background, if even possible with high accuracy or atleast have a popup window come up so the user can turn on the GPS right away. But sadly I couldn't find a single way to do so in QT, if there is a solution it's always written in Java. Can I somehow do it in QT too or import Java code in it?
Would I also be able to keep my GPS updates running in the background? Because as soon as I press the home button the updates stop to come up in the console with qDebug... or is it just the qDebug function that can't run when the app is not open?
Will I be able to use GPS in my Qt app?
First, check if the target platform has GPS and/or capable of resolving geo-coordinates. Next check the manual out: Qt Location. Mind that they refer to this functionality as 'location' so it maybe partially available even without actual GPS unit on device if there is another provider type (I guess partially and not for all platforms). I could only find this list of platforms supported:
Qt Location Classes for accessing GPS and other location services and
for mapping and navigation. Split off from the Qt 4 Mobility module of
Qt Location. Supported on Android, BlackBerry, iOS, Linux (using
GeoClue), Windows and Sailfish OS.
As for starting the GPS (location services provider) there is such entry for QML for sure called start() of PositionSource. It also implies one can find the same functionality in C++ as well.
Would I also be able to keep my GPS updates running in the background? Because as soon as I press the home button the updates stop to come up in the console with qDebug... or is it just the qDebug function that can't run when the app is not open?
Home button: it implies Android? Unclear what you ask but the Android app lifecycle is a bit different matter than that. The GPS will be working independently of your app but will the app respond to messages is more determined by Android.

Resources