Merge pull request #3193 from DanNixon/osd_volt_symbol

Use the volts symbol for voltages in OSD
This commit is contained in:
Michael Keller 2017-06-02 15:37:10 +12:00 committed by GitHub
commit 27679e69f2
1 changed files with 4 additions and 4 deletions

View File

@ -214,7 +214,7 @@ static void osdDrawSingleElement(uint8_t item)
case OSD_MAIN_BATT_VOLTAGE:
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;
case OSD_CURRENT_DRAW:
@ -463,7 +463,7 @@ static void osdDrawSingleElement(uint8_t item)
{
const int cellV = osdGetBatteryAverageCellVoltage();
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;
}
@ -855,12 +855,12 @@ static void osdShowStats(void)
}
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);
}
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);
}