mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 00:05:33 +03:00
Don't waste time displaying an empty OSD string (#14152)
This commit is contained in:
parent
889aa9f9da
commit
2163e44df3
1 changed files with 6 additions and 0 deletions
|
@ -93,6 +93,12 @@ int displayWrite(displayPort_t *instance, uint8_t x, uint8_t y, uint8_t attr, co
|
|||
{
|
||||
instance->posX = x + strlen(text);
|
||||
instance->posY = y;
|
||||
|
||||
if (strlen(text) == 0) {
|
||||
// No point sending a message to do nothing
|
||||
return 0;
|
||||
}
|
||||
|
||||
return instance->vTable->writeString(instance, x, y, attr, text);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue