mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 09:45:37 +03:00
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:
parent
49471727be
commit
8dc019acdf
1 changed files with 1 additions and 1 deletions
|
@ -461,7 +461,7 @@ static void osdDrawSingleElement(uint8_t item)
|
||||||
{
|
{
|
||||||
uint16_t cellV = getBatteryVoltage() * 10 / getBatteryCellCount();
|
uint16_t cellV = getBatteryVoltage() * 10 / getBatteryCellCount();
|
||||||
buff[0] = SYM_BATT_5;
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue