Merge pull request #3193 from DanNixon/osd_volt_symbol
Use the volts symbol for voltages in OSD
This commit is contained in:
commit
27679e69f2
|
@ -214,7 +214,7 @@ static void osdDrawSingleElement(uint8_t item)
|
||||||
|
|
||||||
case OSD_MAIN_BATT_VOLTAGE:
|
case OSD_MAIN_BATT_VOLTAGE:
|
||||||
buff[0] = osdGetBatterySymbol(osdGetBatteryAverageCellVoltage());
|
buff[0] = osdGetBatterySymbol(osdGetBatteryAverageCellVoltage());
|
||||||
tfp_sprintf(buff + 1, "%d.%1dV", getBatteryVoltage() / 10, getBatteryVoltage() % 10);
|
tfp_sprintf(buff + 1, "%d.%1d%c", getBatteryVoltage() / 10, getBatteryVoltage() % 10, SYM_VOLT);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OSD_CURRENT_DRAW:
|
case OSD_CURRENT_DRAW:
|
||||||
|
@ -463,7 +463,7 @@ static void osdDrawSingleElement(uint8_t item)
|
||||||
{
|
{
|
||||||
const int cellV = osdGetBatteryAverageCellVoltage();
|
const int cellV = osdGetBatteryAverageCellVoltage();
|
||||||
buff[0] = osdGetBatterySymbol(cellV);
|
buff[0] = osdGetBatterySymbol(cellV);
|
||||||
tfp_sprintf(buff + 1, "%d.%02dV", cellV / 100, cellV % 100);
|
tfp_sprintf(buff + 1, "%d.%02d%c", cellV / 100, cellV % 100, SYM_VOLT);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -855,12 +855,12 @@ static void osdShowStats(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (osdConfig()->enabled_stats[OSD_STAT_MIN_BATTERY]) {
|
if (osdConfig()->enabled_stats[OSD_STAT_MIN_BATTERY]) {
|
||||||
tfp_sprintf(buff, "%d.%1dV", stats.min_voltage / 10, stats.min_voltage % 10);
|
tfp_sprintf(buff, "%d.%1d%c", stats.min_voltage / 10, stats.min_voltage % 10, SYM_VOLT);
|
||||||
osdDisplayStatisticLabel(top++, "MIN BATTERY", buff);
|
osdDisplayStatisticLabel(top++, "MIN BATTERY", buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (osdConfig()->enabled_stats[OSD_STAT_END_BATTERY]) {
|
if (osdConfig()->enabled_stats[OSD_STAT_END_BATTERY]) {
|
||||||
tfp_sprintf(buff, "%d.%1dV", getBatteryVoltage() / 10, getBatteryVoltage() % 10);
|
tfp_sprintf(buff, "%d.%1d%c", getBatteryVoltage() / 10, getBatteryVoltage() % 10, SYM_VOLT);
|
||||||
osdDisplayStatisticLabel(top++, "END BATTERY", buff);
|
osdDisplayStatisticLabel(top++, "END BATTERY", buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue