Skip to content

Commit

Permalink
Merge pull request #10612 from iNavFlight/MrD_Fix-negative-altitude
Browse files Browse the repository at this point in the history
Fix negative altitudes in OSD
  • Loading branch information
MrD-RC authored Jan 18, 2025
2 parents 5a4c7ca + 68e59df commit a54ba7d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/io/osd.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,12 +486,13 @@ static void osdFormatWindSpeedStr(char *buff, int32_t ws, bool isValid)
*/
void osdFormatAltitudeSymbol(char *buff, int32_t alt)
{
uint8_t digits = osdConfig()->decimals_altitude;
uint8_t totalDigits = digits + 1;
uint8_t symbolIndex = digits + 1;
uint8_t digits = osdConfig()->decimals_altitude + 1;
uint8_t totalDigits = digits;
uint8_t symbolIndex = digits;
uint8_t symbolKFt = SYM_ALT_KFT;

if (alt >= 0) {
digits--;
buff[0] = ' ';
}

Expand Down

0 comments on commit a54ba7d

Please sign in to comment.