Add new settings page and element positioning preview for goggle OSD#222
Add new settings page and element positioning preview for goggle OSD#222ligenxxxx merged 7 commits intohd-zero:mainfrom
Conversation
|
Very Nice! May I make a few recommendations:
Overall I really like the layout and excellent use of the dropdown. As for they wonkyness I believe the main window is 1080p and the live view is 720p and thus it draws the live view within that area starting from the top left.... so for you testing purpose... maybe set the main window to 720p instead to ensure its going to display properly. I can test it out for you on the goggles. |
My goggles are already in the mail and should arrive later this week, I'll convert this pr to a draft for now and see if I can come up with a preview in the mean time. I'll let you know if i got something to test 😄 |
|
Added a preview for the element positioning, which is accessible from the OSD settings page. I also added acceleration when moving the sliders to make positioning less tedious without losing precision. I would love some feedback on how it feels on real goggles. Fair amount of new stuff with this one, so the more people hunting for bugs, the better. |
|
Tested on my goggles and it works very well. The acceleration took some getting used to as when i tried slowing down to fine tune the position the movement still had a significant skip. I do have a question... without looking at the code are you handling 1080p live mode because I noticed the footnote stating 720p canvas? Otherwise I love it! |
|
Should get my goggles tomorrow, I'll see if I can make the acceleration feel better then, currently it's just a 1 second timeout to go from max speed back to precision (or scrolling in the other direction). |
841882f to
815e70a
Compare
|
Changed the slider scroll speed to depend on the time between inputs, aka how fast you spin the wheel. |
The scrolling is very good now. I can transition from rapid to fine movement nicely. Overall it i think it works great! |
|
Just toggled on and off elements to test. Looks nice. Suggestions for this PR: I was a little confused by the persistence of HDZero VRX elements while configuring OSD in analog mode :-) Looking forward to goggle battery voltage display :-) |
|
Hmm, You can return to the main goggle menu and leave the Adjust OSD elements menu stuck in the display. if you go back into Adjust OSD elements you can then cancel to clear it from the display. |
src/ui/ui_osd_element_pos.c
Outdated
|
|
||
| // ########################################################################### | ||
| // ########################## local variables start ########################## | ||
| // ########################################################################### |
There was a problem hiding this comment.
imho blocks like these have little utility.
There was a problem hiding this comment.
i suppose it's pretty obvious when looking at the code, removed the blocks.
Not sure what you mean by default all elements ON, could you elaborate? |
Nice find! A long press should now discard any changes and return to the main menu correctly. |
Maybe something with my usage caused all my elements to show as OFF? I had been using 16x9 OSD and they were all showing in 9.0.12 release. |
That is interesting, perhaps it has something to do with my recent pr where the way bools are saved was changed? (#196) This is from just before the pr: https://github.com/hd-zero/hdzero-goggle/actions/runs/4685509451 |
|
@Nikolas-S , I suspect your are correct about the change in settings storage. My interest in this project is much greater than my working knowledge of it... Please let me know if you think I should create issue for any of the thoughts below. I do not see mechanisms to: Related observations: Other observations (may be helpful for long term dev testing): |
|
@pitts-mo regarding your first two points, I created issue #236 which addresses them, those are important to get resolved before a next release. Regarding your OSD being gone after going back to 9.0.12, I am not sure what exactly 9.0.12 is based off of but ever since #182 from late February, the visibility of OSD elements has been saved as 0/1 in the settings, just without any UI for the user to change the settings. So if pr #182 is included in 9.0.12, testing this new pr would have made your OSD element visibility settings incompatible with 9.0.12, since bools are now saved as true/false instead of 0/1. Other than that, if you stay only within the new pr, are settings being retained correctly? |
|
Sorry @Nikolas-S , I was away for a bit. Yes, My observations appear to agree. And Yes, So far my settings have been working as expected even when switching between this PR and a recent build from master. |
56912a8 to
92076af
Compare
|
Rebased after recent OSD element changes. |
|
Before merging this, we should finish up #249, which will hopefully allow people to go back to older versions after testing new developments which may make the settings file incompatible with older/stable versions that don't yet have a way to reset settings.
|
|
This PR is just awesome! Thank You very much for this! Now I can set antenna indicators so it makes sense for me 😄 Now I`m on fw from this build: https://github.com/Nikolas-S/hdzero-goggle/actions/runs/5054980978 and it works as should. Flew today five packs and it was rock solid. |
move osd mode from image settings to osd settings
move positioning settings from osd settings page to preview ui
change slider scroll speed to be based on time between inputs
rm superfluous comments
92076af to
e99d396
Compare
|
Rebased after merge of #249 |
Thank you, glad you like it :) Nice, just don't risk too much when flying PRs 😁 |
|
Feature request: import/export settings to/from SD card would be really useful. |


WARNING: The way settings are saved was modified on the main branch recently. If you test this PR and change the visibility of OSD elements, you will have to reset your settings using the reset button on the Firmware page just before going back to 9.0.12, otherwise your OSD elements may be invisible in 9.0.12.
Created a new settings page for the goggle OSD.
Moved the osd mode setting from image settings to the new osd settings.
The new page allows for individual positioning and visibility settings for every goggle osd element.
The element position can be set separately for 4x3 and 16x9 modes, visibility is shared between modes.
The element position is set using x and y sliders. I think this is ok for now but the goal is to have the elements show and update live, similar to the image settings. (don't have my goggles yet and the osd seemed wonky on the emulator)
I also added acceleration when moving the sliders to make positioning less tedious while not losing precision, would love some feedback on how it feels on real goggles.
If anyone has ideas for improvements, let me know.
For the devs:
I added a new app state APP_STATE_SUBMENU_ITEM_FOCUSED.
When in that state, a pages on_roller is called but without automatically changing the submenu item selection, allowing the page to correctly handle input for items like dropdown menus and sliders.
I propose we use the new state for future changes, seems cleaner than separate app states for every element or other workarounds.