betaflight-configurator
betaflight-configurator copied to clipboard
Bigger OSD grid support
Consider this a draft/proof of concept + not ready for merge, because:
- The firmware doesn't support this feature yet.....
- The implementation here should be improved a little - eg: it needs MSP version feature switches; more testing + potentially updating to match however the firmware implements this.
It is configurator side changes to support different grid sizes for the OSD; initially hoping for support along the lines of the HD OSD found in iNav (50 * 18) which is supported by HDZero + others; but the changes make the configurator able relatively easily to support any size.
Not much to it; but in brief I have:
- Added a new 'HD' size alongside the existing PAL/NTSC options.
- Replaced the single width of 30 (front FONT.constants.SIZES.LINE) with new OSD.constants.VIDEO_COLS, matching the existing OSD.constants.VIDEO_LINES
- In CSS, the grid that shows as you drag elements now uses a dashed border instead of a background image, so that we don't need to keep creating new images for every size.
- Also a trivial fix for virtual mode; OSD needs to be passed now - guessing the OSD var was previously in the global scope.
It seems to work in so far as I can use the UI, set up a PAL/NTSC OSD as usual + can also set up an HD one including saving/retrieving it from an FC (running BF 4.3) - positions are saved, survive a power cycle etc.
More than happy to own the feature + work on this further should the firmware team decide to implement the feature.
Do you want to test this code? Here you have an automated build: Betaflight-Configurator-Android Betaflight-Configurator-Linux Betaflight-Configurator-macOS Betaflight-Configurator-Windows WARNING: It may be unstable and result in corrupted configurations or data loss. Use only for testing!
Do you want to test this code? Here you have an automated build: Betaflight-Configurator-Android Betaflight-Configurator-Linux Betaflight-Configurator-macOS Betaflight-Configurator-Windows WARNING: It may be unstable and result in corrupted configurations or data loss. Use only for testing!
Kudos, SonarCloud Quality Gate passed! 
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication
Do you want to test this code? Here you have an automated build: Betaflight-Configurator-Android Betaflight-Configurator-Linux Betaflight-Configurator-macOS Betaflight-Configurator-Windows WARNING: It may be unstable and result in corrupted configurations or data loss. Use only for testing!
AUTOMERGE: (FAIL)
- github identifies PR as mergeable -> FAIL
- assigned to a milestone -> PASS
- cooling off period lapsed -> FAIL
- commit count less or equal to three -> PASS
Don't mergelabel NOT found -> PASS- at least one
RN:label found -> PASS Testedlabel found -> FAIL- assigned to an approver -> FAIL
- approver count at least three -> FAIL
line 109, LINE: 30, may be removed.
#3071 supercedes, so closing