1
0
Fork 0
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:
Steve Evans 2025-01-14 13:06:22 +00:00 committed by GitHub
parent 889aa9f9da
commit 2163e44df3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);
}