mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 01:35:41 +03:00
CF/BF - OSD - Show symbol for GPS speed to better align with altitude
display on OSD. Name and extract the duplicated GPS_speed equation - in CM/S to KM/H.
This commit is contained in:
parent
c40c507f1b
commit
636c194aea
2 changed files with 5 additions and 2 deletions
|
@ -220,7 +220,8 @@ static void osdDrawSingleElement(uint8_t item)
|
|||
|
||||
case OSD_GPS_SPEED:
|
||||
{
|
||||
sprintf(buff, "%d%c", GPS_speed * 36 / 1000, SYM_MS);
|
||||
// FIXME ideally we want to use SYM_KMH symbol but it's not in the font any more, so we use K.
|
||||
sprintf(buff, "%dK", CM_S_TO_KM_H(GPS_speed) * 10);
|
||||
break;
|
||||
}
|
||||
#endif // GPS
|
||||
|
@ -637,7 +638,7 @@ static void osdUpdateStats(void)
|
|||
{
|
||||
int16_t value = 0;
|
||||
#ifdef GPS
|
||||
value = GPS_speed * 36 / 1000;
|
||||
value = CM_S_TO_KM_H(GPS_speed);
|
||||
#endif
|
||||
if (stats.max_speed < value)
|
||||
stats.max_speed = value;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue