Disable HDMI output from QtQuick2 Application on embedded Linux - qt5

I've got an embeddedLinux board with a Qt5 Application. The goal is to disable the display when unused or currently not needed.
I use EGLFS and the display is connected to HDMI. Echo 1 to /sys/class/graphics/fb0/blank has no impact but is also not complaining.
Hiding the QtQuickView has no impact. Set visibility to false neither.
Embedded Linux is build using yocto.
No problems with the build so far. My only problem left: Disable the HDMI out if not needed.
Any ideas what to try?
BR
ML

I dont know if this is a proper approach, at least it works:
to turn off:
echo off > /sys/class/drm/cardX/connectorY/status
ro recover:
echo on > /sys/class/drm/cardX/connectorY/status
from command line
and from Qt via a QFile operation.
Maybe it will help someone else. Better approaches are of course still welcome.

Related

Issue in implementing capacitive touch in PIC18F26K40 microcontroller using mTouch library

i currently working on PIC microcontroller. I have PIC18F26K40. I want to use CVD (Capacitive Voltage Divider) technique to implement capacitive touch button. I am using mTouch library of MCC (Microchip Code Configurator) library for that. I am doing same as per microchip documentation (links are here and here ). PIC is not detecting the touch. Here is my main method below:
void main(void)
{
// Initialize the device
SYSTEM_Initialize();
INTERRUPT_GlobalInterruptEnable();
INTERRUPT_PeripheralInterruptEnable();
LED_TRIS = OUTPUT;
while (1)
{
if(MTOUCH_Service_Mainloop())
{
/* Button API*/
if (MTOUCH_Button_isPressed(0))
LED_LAT = HIGH;
else
LED_LAT = LOW;
}
}
}
I have some doubts:
What is differential CVD.
What is driver shield. Do i need it?
Do i need to use two analog channels.
I have worked and tested CTMU mode of PIC18F26K22. Is there any way use CVD like CTMU.
If you have any solutions with or without library then let me know.
I am attaching some screenshot of my MCC configurations. Please go through it.
Help needed!
Note:
MPlab IDE: v5.50
Analog pin used for sensing: RB0
Programmer: PICKIT3
I came across your post whilst researching another issue with PIC mTouch on the same MPU you're using (or, rather the low voltage version, PIC18LF26K40). I am also using MPLAB X v5.50 with the mTouch plugin. Just wanted you to know that I was able to set up a single touch button with no problem on this chip, actually compiled and worked on the first try. So, you're on the right track!
You do not need to use the "driven shield" that is presented as an mTouch output (this is for improving signal integrity later when you're concerned about such things, see the various app notes on this). I used the "CS" (capacitive sensor) output only and it works fine.
This video helped me get started: https://www.youtube.com/watch?v=CCW3g9RqpZk
Hope this helps a bit.

How to supress Cytoscape.js warning for custom wheel sensitivity?

Since we updated to Cytoscape.js to version 3.3.2 we get the following warning:
You have set a custom wheel sensitivity.This will make your app zoom
unnaturally when using mainstream mice. You should change this value
from the default only if you can guarantee that all your users will
use the same hardware and OS configuration as your current machine.
As we intended the mouse wheel sensitivity to be that way, the warning is superfluous in our case. How can we suppress it?
cytoscape.warnings(false)
The docs say this about warnings:
Note that Cytoscape.js will print warning messages to the console to help programmers avoid mistakes. If you want to disable these messages, call cytoscape.warnings(false) to turn warnings off completely. You can turn them back on with cytoscape.warnings(true), and you can get the current state with cytoscape.warnings(). It is recommended that you leave warnings enabled at least for development builds of your app.

Hololens application stopping at splash screen

I'm working on a Unity project for Hololens, that uses the camera to capture pictures, send them to a photo recognition API and displays the result. The project works perfectly fine in unity, but not on the emulator/Hololens.
Unfortunately, I wrote a lot of code at once, so i don't know at what point this problem started. The problem show's up after building the project and running it on the Hololens/emulator in Debug mode. On the Hololens, I see the starting window (the one you see after you open any application). After i place it, i see End showing splash screen. on the Output window in Visual Studio, and it just doesn't go any further (but doesn't freeze either, just does nothing).
I don't know where it's coming from, since no exceptions are thrown, but i suspect the camera is the cause. Earlier, i had to comment this line of code:
transform.position = Camera.main.ScreenToWorldPoint(new Vector3((CameraManager.Resolution.width * .5f), (CameraManager.Resolution.height * .5f), 10));
because the function ScreenToWorldPoint was throwing the following exception:
Screen position out of view frustum (screen pos 0.000000, 0.000000, 10.000000) (Camera rect 0 0 0 0)
As you see it says that the Camera rect's size is 0. I even tried directly logging the camera's dimensions to make sure (Debug.Log(Camera.main.pixelWidth + ", " + Camera.main.pixelHeight)), and sure enough, they were (0, 0) on the Hololens/emulator.
I made sure that webcam is supported, and that my camera settings are all set, but that didn't help either.
So i'm not sure if that's the cause of the problem or simply a symptom. And I can't start anywhere since neither the Output nor the Error window show anything wrong. Any help or suggestions would be greatly appreciated.
Thanks for reading!
Edit: Here's the entire output log from beginning to end.
Edit2: I don't know if this is significant, but if I paused execution (in Visual Studio), it always seem to be at Build/ProjectName/App.css => Line 78:
[MTAThread]
static void Main(string[] args)
{
var app = new App();
CoreApplication.Run(app); //<===== Here
}
You might want to check any of your Start() methods. You might have some code that is CPU intensive. Even if it runs smoothly in Unity, doesn't mean it will run easily on HoloLens since their CPU is not powerful.
Also, to avoid any Camera problems, make sur to use the Camera prefab from this
repository :
https://github.com/Microsoft/MixedRealityToolkit-Unity
Those are just some thoughts, hope it helps!
Turns out i didn't enable "Virtual Reality Supported" under Other settings in PlayerSettings. It's really dumb, but i hope this helps someone.

IntelliJ output console INFO colour

Does anyone know why IntelliJ is printing all log messages to my console in red coloured text? This make it really hard to distinguish between info and trace messages and the actual error messages that I need to see!
I'm using Tomee and CDI if this is relevant!
Thanks for your assistance,
Edit
My setting all look okay within the preferences window:
I have stacked with the same problem too. For now I'm using Intellij IDEA 2016.1 and there are no such opportunity to color logs the way you want.
For me I have solved it by using Grep Console Plugin and recommend it to you.
It's easy to install and use.
Before
After
I had exactly same problem. Not sure about your case, but mine was following:
I use SLF4j Simple Logger Facade in my projects (because it is simple, yup). So it turned out that if you don't specify org.slf4j.simpleLogger.logFile property in simplelogger.properties file located in your resources folder (as well as if you don't have that file at all), the logger output defaults to System.err which is red in Idea.
The solution proposed by #pavlo sort of helped, but the base colour was still red.
So I added this line to src/java/main/resources/simplelogger.properties:
org.slf4j.simpleLogger.logFile=System.out
and installed Grep Console Plugin. Together they perfectly solve the problem with SLF4j Simple Logger.
I found that if I map the Console Colors for Bad command or filename to my preferred Logger.INFO color, it works fine.
This is an issue that needs fixing, for for now this workaround works for me.
This can also be solved by adding the following VM option to your run configuration.
-Dorg.slf4j.simpleLogger.logFile=System.out

Using MXUnit or is there another way to display coldfusion output using Intellij IDEA 15

I'm loving IntelliJ because I also work with MySQL and the integration into one UI is great. Seems that IntelliJ works nicely with ColdFusion as well. I'm just hoping to successfully use MXUnit, but I seem to be getting an error upon testing. My main goal is just being able to display the output directly in IntelliJ instead of outputting in a browser.
My test site path: /Applications/ColdFusion11/cfusion/wwwroot/Test/test.cfc
Error http://localhost/mxunit-launcher.cfc?method=executeTestCase&componentName=test
Seems like I have to add in a mapping, maybe in CF Admin, because the path and web path don't match but I haven't done that before if that's the case. Here's a screenshot of input in IntelliJ, and the output at the bottom of the screenshot when running the debugger:
Thanks for any feedback on what I might be missing.