betaflight-configurator icon indicating copy to clipboard operation
betaflight-configurator copied to clipboard

Bigger OSD grid support

Open benlumley opened this issue 3 years ago • 6 comments

Consider this a draft/proof of concept + not ready for merge, because:

  1. The firmware doesn't support this feature yet.....
  2. 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.

benlumley avatar Aug 24 '22 20:08 benlumley

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!

github-actions[bot] avatar Aug 24 '22 20:08 github-actions[bot]

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!

github-actions[bot] avatar Aug 24 '22 20:08 github-actions[bot]

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarqubecloud[bot] avatar Aug 24 '22 21:08 sonarqubecloud[bot]

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!

github-actions[bot] avatar Aug 24 '22 21:08 github-actions[bot]

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 merge label NOT found -> PASS
  • at least one RN: label found -> PASS
  • Tested label found -> FAIL
  • assigned to an approver -> FAIL
  • approver count at least three -> FAIL

blckmn avatar Aug 24 '22 23:08 blckmn

line 109, LINE: 30, may be removed.

nerdCopter avatar Sep 21 '22 19:09 nerdCopter

#3071 supercedes, so closing

benlumley avatar Nov 15 '22 11:11 benlumley