mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-26 01:35:35 +03:00
The battery icon changes depending on the percentage of remaining
voltage.
This commit is contained in:
parent
e738003dfe
commit
04baa22ba2
1 changed files with 3 additions and 1 deletions
|
@ -177,7 +177,9 @@ static void osdDrawSingleElement(uint8_t item)
|
|||
|
||||
case OSD_MAIN_BATT_VOLTAGE:
|
||||
{
|
||||
buff[0] = SYM_BATT_5;
|
||||
uint8_t p = calculateBatteryPercentage();
|
||||
p = (100-p)/16.6;
|
||||
buff[0] = SYM_BATT_FULL + p;
|
||||
sprintf(buff + 1, "%d.%1dV", vbat / 10, vbat % 10);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue