mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 00:05:33 +03:00
Add option to display OSD menus over a solid gray background
Improves menu readability by changing the background from a transparent display of the camera image to a static opaque gray background. The behavior is controlled with the `osd_menu_background` parameter which defaults to `TRANSPARENT` to preserve the previous behavior. Other opaque options are available: ``` osd_menu_background = TRANSPARENT Allowed values: TRANSPARENT, BLACK, GRAY, LIGHT_GRAY ``` The background setting is available in the CMS OSD menu and the user can cycle through the various options with the display updating in real-time. Currently only the onboard MAX7456-based OSD is supported, but the implementation adds `displayPort` support so it can easily be extended to other OSD devices if those manufacturers want to add support. Also can be extended to other background types (like colors, varying transparency, etc.) for future device support. Makes use of the built-in MAX7456 feature to display all transparent pixels as "gray". The MAX7456 display area seems to be a few scan lines smaller than the actual camera video image so it's normal for some of the camera image to "leak" at the top/bottom of the display. The OSD display area can be adjusted up/down using the `vcd_v_offset` setting if desired.
This commit is contained in:
parent
38c792c1c5
commit
e7b9828c3b
12 changed files with 111 additions and 5 deletions
|
@ -153,6 +153,13 @@ bool displayWriteFontCharacter(displayPort_t *instance, uint16_t addr, const osd
|
|||
return false;
|
||||
}
|
||||
|
||||
void displaySetBackgroundType(displayPort_t *instance, displayPortBackground_e backgroundType)
|
||||
{
|
||||
if (instance->vTable->setBackgroundType) {
|
||||
instance->vTable->setBackgroundType(instance, backgroundType);
|
||||
}
|
||||
}
|
||||
|
||||
bool displayCheckReady(displayPort_t *instance, bool rescan)
|
||||
{
|
||||
if (instance->vTable->checkReady) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue