1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-13 19:40:31 +03:00

OSD background rendering (#13897)

* Ensure display severity attribute is set to defaults for background items

* MAX7456 doesn't have a background layer
This commit is contained in:
Steve Evans 2024-09-13 21:20:18 +01:00 committed by GitHub
parent c88f7c9016
commit 73b26168cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View file

@ -512,7 +512,7 @@ void max7456Write(uint8_t x, uint8_t y, const char *text)
bool max7456LayerSupported(displayPortLayer_e layer)
{
if (layer == DISPLAYPORT_LAYER_FOREGROUND || layer == DISPLAYPORT_LAYER_BACKGROUND) {
if (layer == DISPLAYPORT_LAYER_FOREGROUND) {
return true;
} else {
return false;

View file

@ -2151,8 +2151,9 @@ static bool osdDrawSingleElementBackground(displayPort_t *osdDisplayPort, uint8_
activeElement.type = OSD_TYPE(osdElementConfig()->item_pos[item]);
activeElement.buff = elementBuff;
activeElement.osdDisplayPort = osdDisplayPort;
activeElement.rendered = true;
activeElement.drawElement = true;
activeElement.rendered = true;
activeElement.attr = DISPLAYPORT_SEVERITY_NORMAL;
// Call the element background drawing function
osdElementBackgroundFunction[item](&activeElement);