CF/BF - Fix average cell voltage.

4.10 was rendered as "4.10V"
4.07 was rendered as "4.7V"

Caused by incorrect format specification.
This commit is contained in:
Hydra 2017-04-23 21:09:42 +01:00 committed by Dominic Clifton
parent 49471727be
commit 8dc019acdf
1 changed files with 1 additions and 1 deletions

View File

@ -461,7 +461,7 @@ static void osdDrawSingleElement(uint8_t item)
{
uint16_t cellV = getBatteryVoltage() * 10 / getBatteryCellCount();
buff[0] = SYM_BATT_5;
tfp_sprintf(buff + 1, "%d.%dV", cellV / 100, cellV % 100);
tfp_sprintf(buff + 1, "%d.%02dV", cellV / 100, cellV % 100);
break;
}