-
-
Notifications
You must be signed in to change notification settings - Fork 938
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
Disable video modes that are not in the firmware #3767
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
OSD_Hd has only one option at the moment, so the whole 'Video Format' section could be hidden. |
i rather see the section to know the configurator is setting it correctly. at least in this iteration, maybe 11.0 can hide the section once it is known to 100% work. |
Maybe the status of It is, I think, the fundamental setting of relevance here. If so, whenever Similarly for SD options, eg In situations where the only define in the build is In situations where the only define in the build is In situations where both HD_OSD and SD_OSD are in the build defines, then the size of the screen should change appropriately according to the user's selection for I notice that with the PR at present, if Also, if I click 'auto' in the OSD tab, my change jumps back to 'HD', so Auto cannot be selected. That's OK I think; but Auto might as well not be shown. Unfortunately, if the current value for vcd_video_system Also, if I deliberately set Hence there is a lot more work to go here. |
This comment has been minimized.
This comment has been minimized.
ee5bc27
to
b0c1c92
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
maybe we need a simple solution for release and subsequent refactoring of the whole subsystem |
Mark @haslinghuis, the OSD tab display must follow the If I have an FC with pure HD-only firmware, but the canvas dimensions are SD at the start, there is no way in configurator, other than changing the canvas values manually in CLI, to get the canvas values correct. If canvas values are set for SD, and if I click 'SAVE' even though Hence we need a check of the canvas dimensions when entering the OSD tab, and on saving the OSD setup. I don't mind if the check is in firmware or in Configurator, but it can be done entirely in Configurator. In Configurator, we could say, if canvas width is <35, then the dimensions are SD. And then, if the user wants HD with It is possible that the user has customised their HD OSD width and height, but it is not likely they would intend to use a width <35 on an HD system. So if the width and height were previously set to a non-SD range, the above check would not remove their HD screen dimension customisations. If the If the With this PR, in an HD-only build, if the prior canvas dimensions are 30x16, the canvas is locked at 30x16, despite Users will not swap rapidly from one mode to the other, so for now don't worry about re-positioning elements. Just get the canvas width and height to honour the user selected video format. |
PS about PAL and NTSC... PAL(720 x 576) is 20% 'taller' than NTSC (720 x 480) in 'pixels'. If all pixels were 'square', the NTSC width:height ratio would be 1.5:1, and for PAL 1.25:1. Interestingly on the old analog TV's, both NTSC and PAL pixels were non-square. NTSC pixels are taller than wide, ratio 1:0.906, whereas PAL pixels are wider than they are tall, 1:1.06. If we consider the non-square pixels, the old analog TVs ended up with almost exactly the same screen ratios, 1:1.36 for NTSC and 1:1.38 for PAL. But if we stick to 'pixels' and draw them 'square', the ratios are quite different, and NTSC images end up being more of a wide-screen, with fewer vertical pixels. in display.h I see:
These ratios don't quite match the pixel ratios of either NTSC or PAL. That explains why I often had to make manual adjustments. So I guess we need a way in Configurator to detect whether the user wants to use HD or SD. If they select HD, and the values for canvas are in the SD range, ie width <35, we should use apply HD values, and vice versa. Otherwise, unless the user changes their video system selection, we should NOT modify the user's canvas settings, which may have been carefully customised. |
I think hiding unused OSD modes should be separated and go in 10.11 or 11.0. |
You can make a Build with both OSD_SD and OSD_HD, something to take into consideration or maybe change. |
We don’t just need to consider Alas WS and DJI don’t send the When switching to HD the canvas size gets initialised at Rather that hiding the video resolution selection on the configurator, wouldn’t it be better to just grey out the options which aren’t available? That said, do we have a big enough issue here for this to be classified as a bug and thus worthy of inclusion in 4.5/10.10? |
Hiding video option is not the issue - as it reflects what is configurable in the build. Would be the same as gray out options for me.
|
This comment was marked as outdated.
This comment was marked as outdated.
bug found. with local builds without buildkey. local build without build-key - will test, other customs and edit comment. |
This comment has been minimized.
This comment has been minimized.
🚀 did not re-test cloud-built hex. |
With a local build using these settings:
I see AUTO, PAL, NTSC and HD options in the OSD tab. Selecting HD drops back to the previous selection. This behaviour is like for Master. original test results not correct... With a cloud build, it looks, on first glance, exactly the same. But there is a tiny difference. The button next to the text 'HD' is grey, not black, and cannot be selected. It is a bit subtle, so I missed it: Now that I cannot select HD, this is a bit better than before. It helps the user understand that they don't have the option when they are shown disabled. It would definitely be easier to interpret if the text with the button was also made grey :-) sorry if that is a lot of work. PS I'm using the 7401d32 build downloaded from here dated 26 January. |
Instead of hiding - we disable radio buttons which are not included in the build - so if user only use OSD_SD or OSD_HD it won't affect centering of elements. |
Would it be possible to 'grey' the text associated with the option as well as the little circle for the option? eg in the above image, not just make the little circle grey, but also make the text 'HD' grey? That would be really good I think. A bit confusing at the moment. Definitely works very nicely for cloud builds, I tested both SD only and HD only. For both SD and HD, behaviour is OK also, just the screen moves around, that's OK. If the text could be grey, that would be awesome! |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@ctzsnooze changed to |
|
Do you want to test this code? Here you have an automated build: |
@haslinghuis @nerdCopter @ctzsnooze I had trouble to flash with the BF PR, I may have better luck next time |
i think now it is being accommodated in the firmware after betaflight/betaflight#13320 |
* Hide unused OSD video mode * Fixes per review * Only apply to API 1.45 and up. Thanks nerdCopter * Disallow cursor * try colors
Disable elements not included in the build instead of hiding them.
See also betaflight/betaflight#13320 (comment)
Recommendation is either use
OSD_SD
orOSD_HD
not both as switching elements is not accounted for in firmware.