-
Notifications
You must be signed in to change notification settings - Fork 4.2k
GimbalIndicator: prevent text from jittering around #13204
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
base: master
Are you sure you want to change the base?
Conversation
This fixes the issue where the gimbal indicators Azimuth and Yaw keep jumping around when the value is around 0, going from -0 to 0. The fix (from what I understand): - Makes the boxes have a fixed width, - And round to full degrees.
Hi Julian, it is true that around 0 that behavior was annoying, thanks for addressing it. Your approach seems fine to me. However, I am not sure if I like to remove completely floating points. Some users might like to have that decimal point there. If you think it makes sense, I think we could expose a setting in gimbalcontrollersettings, a quick checkbox, and add it to GimbalIndicator.qml, we have the gimbal settings there too. If you already tried your approach with floating points and the extra width made this all look weird, it isn't a big deal, I am fine too with no floating points. Thanks! |
Thanks for the review @Davidsastresas. I guess I don't understand why you would want the floating point. It's not like you do something with that exact number, it's more of an indicator. Or what would be the purpose of knowing 0.1 degrees? |
I agree most users won't mind. I have in mind some niche users like survey people doing mapping of solar panels. For some reason it is really important for the sensor to be parallel to the panel's angle, and they could appreciate the extra floating point to be extra sure everything is fine during mission. In any case, those niche users will probably have a QGC custom fork anyway, so if you think it is a good idea to remove the floating point I am fine with it too. Thanks! |
They could add the value to telemetry if they want more detailed? |
Can they? Or do we need to add that somehow? |
The Gimbal values could be set up as a FactGroup then they are available to the telemetry display. |
Is this just a problem with 0s? Would a gimbal angle bounce around between say 9 and 10 causing the digit count to change constantly? Reason I ask is that I'd rather not have this be fixed width. Toolbar space is at a premium. You want to take as little as possible. |
Yes, it also changes from 9 to 10, and any change really as it's not a monospace font. If you ask me, the gimbal angle probably shouldn't be up there like that in the first place and could be a more intuitive indicator, but it's better than nothing. |
Ok, let me play around with this a bit |
But if the gimbal position is static would it be possible for the gimbal angle reported to bounce between 9.5 and 9.4 causing the rounded value to bounce between 9 and 10 even though the gimbal is not moving. Or to put the question another way if we just round the gimbal values and don't do fix width. Will the only time the gimbal indicator change size happen when the gimbal is actually being moved. |
@DonLakeFlyer That's correct, with rounding that should only change when gimbal moves. However keep in mind we have the option of showing yaw as azimuth or local yaw. So depending on this option and gimbal being on locked or follow mode, yaw/azimuth could change with vehicle yaw. About having values there at all, I understand it is a larger indicator than usual. My initial idea for it was an additional button/indicator in flyview, something like this: and after click expands to the whole controls panel. But I understand this could be too invasive for fly view as well. So I am really okay with whatever you guys decide. We always have time to keep iterating if we miss anything in the future. |
This fixes the issue where the gimbal indicators Azimuth and Yaw keep jumping around when the value is around 0, going from -0 to 0.
The fix (from what I understand):