mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-14 11:59:58 +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:
parent
c88f7c9016
commit
73b26168cd
2 changed files with 3 additions and 2 deletions
|
@ -512,7 +512,7 @@ void max7456Write(uint8_t x, uint8_t y, const char *text)
|
||||||
|
|
||||||
bool max7456LayerSupported(displayPortLayer_e layer)
|
bool max7456LayerSupported(displayPortLayer_e layer)
|
||||||
{
|
{
|
||||||
if (layer == DISPLAYPORT_LAYER_FOREGROUND || layer == DISPLAYPORT_LAYER_BACKGROUND) {
|
if (layer == DISPLAYPORT_LAYER_FOREGROUND) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -2151,8 +2151,9 @@ static bool osdDrawSingleElementBackground(displayPort_t *osdDisplayPort, uint8_
|
||||||
activeElement.type = OSD_TYPE(osdElementConfig()->item_pos[item]);
|
activeElement.type = OSD_TYPE(osdElementConfig()->item_pos[item]);
|
||||||
activeElement.buff = elementBuff;
|
activeElement.buff = elementBuff;
|
||||||
activeElement.osdDisplayPort = osdDisplayPort;
|
activeElement.osdDisplayPort = osdDisplayPort;
|
||||||
activeElement.rendered = true;
|
|
||||||
activeElement.drawElement = true;
|
activeElement.drawElement = true;
|
||||||
|
activeElement.rendered = true;
|
||||||
|
activeElement.attr = DISPLAYPORT_SEVERITY_NORMAL;
|
||||||
|
|
||||||
// Call the element background drawing function
|
// Call the element background drawing function
|
||||||
osdElementBackgroundFunction[item](&activeElement);
|
osdElementBackgroundFunction[item](&activeElement);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue