mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 12:25:20 +03:00
Merge pull request #10229 from etracer65/msp_displayport_fix
Remove unnecessary drawScreen() calls for MSP displayPort OSD
This commit is contained in:
parent
d99048056d
commit
f12df8c69b
1 changed files with 12 additions and 2 deletions
|
@ -1036,9 +1036,19 @@ void osdUpdate(timeUs_t currentTimeUs)
|
|||
osdRefresh(currentTimeUs);
|
||||
showVisualBeeper = false;
|
||||
} else {
|
||||
// rest of time redraw screen 10 chars per idle so it doesn't lock the main idle
|
||||
bool doDrawScreen = true;
|
||||
#if defined(USE_CMS) && defined(USE_MSP_DISPLAYPORT) && defined(USE_OSD_OVER_MSP_DISPLAYPORT)
|
||||
// For the MSP displayPort device only do the drawScreen once per
|
||||
// logical OSD cycle as there is no output buffering needing to be flushed.
|
||||
if (osdDisplayPortDeviceType == OSD_DISPLAYPORT_DEVICE_MSP) {
|
||||
doDrawScreen = (counter % DRAW_FREQ_DENOM == 1);
|
||||
}
|
||||
#endif
|
||||
// Redraw a portion of the chars per idle to spread out the load and SPI bus utilization
|
||||
if (doDrawScreen) {
|
||||
displayDrawScreen(osdDisplayPort);
|
||||
}
|
||||
}
|
||||
++counter;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue