Skip to content

Commit

Permalink
Fix decimal places for mAh
Browse files Browse the repository at this point in the history
  • Loading branch information
MrD-RC committed Oct 25, 2024
1 parent 5383262 commit 5a165de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/io/osd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1753,7 +1753,7 @@ static bool osdDrawSingleElement(uint8_t item)
} else
#endif
{
if (osdFormatCentiNumber(buff, getMAhDrawn() * 100, 1000, 0, (mah_digits - 2), mah_digits, false)) {
if (osdFormatCentiNumber(buff, getMAhDrawn() * 100, 1000, 0, 2, mah_digits, false)) {
// Shown in Ah
buff[mah_digits] = SYM_AH;
} else {
Expand Down Expand Up @@ -1795,7 +1795,7 @@ static bool osdDrawSingleElement(uint8_t item)
} else
#endif
{
if (osdFormatCentiNumber(buff, getBatteryRemainingCapacity() * 100, 1000, 0, (mah_digits - 2), mah_digits, false)) {
if (osdFormatCentiNumber(buff, getBatteryRemainingCapacity() * 100, 1000, 0, 2, mah_digits, false)) {
// Shown in Ah
buff[mah_digits] = SYM_AH;
} else {
Expand Down

0 comments on commit 5a165de

Please sign in to comment.