mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 01:35:41 +03:00
CF/BF - remove the " " character in front of "LAND NOW" and replace with an
offset variable. Code size is identical on SPRacingF3NEO.
This commit is contained in:
parent
709cd9f8df
commit
8e6c7fb9e3
1 changed files with 6 additions and 2 deletions
|
@ -175,6 +175,9 @@ static void osdDrawSingleElement(uint8_t item)
|
||||||
|
|
||||||
uint8_t elemPosX = OSD_X(osdConfig()->item_pos[item]);
|
uint8_t elemPosX = OSD_X(osdConfig()->item_pos[item]);
|
||||||
uint8_t elemPosY = OSD_Y(osdConfig()->item_pos[item]);
|
uint8_t elemPosY = OSD_Y(osdConfig()->item_pos[item]);
|
||||||
|
|
||||||
|
uint8_t elemOffsetX = 0;
|
||||||
|
|
||||||
char buff[32];
|
char buff[32];
|
||||||
|
|
||||||
switch(item) {
|
switch(item) {
|
||||||
|
@ -422,7 +425,8 @@ static void osdDrawSingleElement(uint8_t item)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BATTERY_CRITICAL:
|
case BATTERY_CRITICAL:
|
||||||
sprintf(buff, " LAND NOW");
|
sprintf(buff, "LAND NOW");
|
||||||
|
elemOffsetX += 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -443,7 +447,7 @@ static void osdDrawSingleElement(uint8_t item)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
displayWrite(osdDisplayPort, elemPosX, elemPosY, buff);
|
displayWrite(osdDisplayPort, elemPosX + elemOffsetX, elemPosY, buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
void osdDrawElements(void)
|
void osdDrawElements(void)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue