mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-07 08:28:30 -04:00
AP_OSD: Make per-cell voltage be shown to two decimal places again
This commit is contained in:
parent
dd7f65ec51
commit
e59b7a5215
@ -1376,10 +1376,18 @@ void AP_OSD_Screen::draw_bat_volt(uint8_t instance, VoltageType type, uint8_t x,
|
|||||||
}
|
}
|
||||||
if (!show_remaining_pct) {
|
if (!show_remaining_pct) {
|
||||||
// Do not show battery percentage
|
// Do not show battery percentage
|
||||||
|
if (type == VoltageType::RESTING_CELL || type == VoltageType::AVG_CELL) {
|
||||||
|
backend->write(x,y, v < blinkvolt, "%1.2f%c", (double)v, SYMBOL(SYM_VOLT));
|
||||||
|
} else {
|
||||||
backend->write(x,y, v < blinkvolt, "%2.1f%c", (double)v, SYMBOL(SYM_VOLT));
|
backend->write(x,y, v < blinkvolt, "%2.1f%c", (double)v, SYMBOL(SYM_VOLT));
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (type == VoltageType::RESTING_CELL || type == VoltageType::AVG_CELL) {
|
||||||
|
backend->write(x,y, v < blinkvolt, "%c%1.2f%c", SYMBOL(SYM_BATT_FULL) + p, (double)v, SYMBOL(SYM_VOLT));
|
||||||
|
} else {
|
||||||
backend->write(x,y, v < blinkvolt, "%c%2.1f%c", SYMBOL(SYM_BATT_FULL) + p, (double)v, SYMBOL(SYM_VOLT));
|
backend->write(x,y, v < blinkvolt, "%c%2.1f%c", SYMBOL(SYM_BATT_FULL) + p, (double)v, SYMBOL(SYM_VOLT));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AP_OSD_Screen::draw_bat_volt(uint8_t x, uint8_t y)
|
void AP_OSD_Screen::draw_bat_volt(uint8_t x, uint8_t y)
|
||||||
|
Loading…
Reference in New Issue
Block a user