Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/main/io/osd.c
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,8 @@ static void osdFormatWindSpeedStr(char *buff, int32_t ws, bool isValid)
static void osdFormatAltitudeSymbol(char *buff, int32_t alt)
{
switch ((osd_unit_e)osdConfig()->units) {
case OSD_UNIT_UK:
FALLTHROUGH;
case OSD_UNIT_IMPERIAL:
if (osdFormatCentiNumber(buff + 1, CENTIMETERS_TO_CENTIFEET(alt), 1000, 0, 2, 3)) {
// Scaled to kft
Expand All @@ -425,8 +427,6 @@ static void osdFormatAltitudeSymbol(char *buff, int32_t alt)
buff[0] = SYM_ALT_FT;
}
break;
case OSD_UNIT_UK:
FALLTHROUGH;
case OSD_UNIT_METRIC:
// alt is alredy in cm
if (osdFormatCentiNumber(buff+1, alt, 1000, 0, 2, 3)) {
Expand Down Expand Up @@ -1864,13 +1864,13 @@ static bool osdDrawSingleElement(uint8_t item)
int16_t value = getEstimatedActualVelocity(Z);
char sym;
switch ((osd_unit_e)osdConfig()->units) {
case OSD_UNIT_UK:
FALLTHROUGH;
case OSD_UNIT_IMPERIAL:
// Convert to centifeet/s
value = CENTIMETERS_TO_CENTIFEET(value);
sym = SYM_FTS;
break;
case OSD_UNIT_UK:
FALLTHROUGH;
case OSD_UNIT_METRIC:
// Already in cm/s
sym = SYM_MS;
Expand Down