-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed 'Sensors Setup' page not showing GUI #11990
base: master
Are you sure you want to change the base?
Conversation
I see what was changed but I don't understand why it was needed. The signals should have worked there way through the new mechanism:
@stepan14511 Could you help with debugging this to determine why the current code doesn't work? |
In the mechanism all the signals work absolutely fine. The other solution could be to subscribe straightly to the qgroundcontrol/src/Vehicle/Vehicle.h Line 1339 in 2d4bb34
The expression in the if statement is always false, since the text variable is following (for example): [cal] progress <20>
Because of this the progress bar is not working. |
Good catch, I probably missed the PX4 issue when making StatusTextHandler because previously I only tested on ArduPilot but at least it helped catch the SensorsComponentController issue. Connecting to the Vehicle signal is the correct way as I had intended for it to be used. |
Ok, so isn't one of the fixes to add:
This will get the signal up through Vehicle. As far as the "<" versus "<" stuff. It looks like this changed on the PX4 firmware side of things at some point. Since in the past the "<" certainly worked. My concern is with back compat with older version of firmware. @HTRamsey Is there some Qt magic to get these strings to replace the "&" stuff which real chars? If so, then the cal stuff could jam the strings through that first and then use the non "&" chars for comparison. This would then in turn work on all firmware versions. |
@DonLakeFlyer
I couldn't find anything apart from the straightforward replace function. |
I believe this is the way to go. For converting the > things: |
@HTRamsey
Removing it solves the issue. |
Not that I recall, I believe that's what was there already before I moved it into StatusTextHandler qgroundcontrol/src/Vehicle/Vehicle.cc Line 985 in 990ed12
|
Hmm, interesting. I believe somewhere along the the way PX4 starting sending status text messages which were HTML. So the message display starting using a rich text field to display status text. Could someone find the "blame" on the original toHtmlEscaped? I only vaguely remember those changes. Need to understand why that was put in there. Must be there for a reason. I think maybe @bkueng was involved? |
I just went backwards through blame. Looks like it was @bkueng. Hopefully he can help explain why this is necessary. |
So I looked through the code and I believe it's correct that the toHtmlEscaped (somewhere) because both the critical vehicle message popup and and vehicle message dropdown use a richtext control If you don't escape then some things could be assumed to be HTML when they are not. That said I think the place where this escaping should happen should not be at a global level. It should only be when the status text is about to be displayed in one of those control. For generic signaling out from Vehicle of status text. I think it should not be escaped at that point. I'm pawing through code right now to figure out exactly where that should be. |
Fixed Vehicle Setup -> Sensors page for PX4 not showing GUI, made to help user with calibration.
Description
Used to be:
Now it works correctly:
Test Steps
Go to Vehicle Setup -> Sensors. Start, for example, accelerometer calibration and you will see no changes in the right part of the screen. Now it works the same way, as it does in the stable verison (correctly).
Related Issue
There might be the same issue with others autopilots. I don't not have ability to check.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.