AP_Notify: add mah consumed to BAT line in OLED displays
This commit is contained in:
parent
7f64c6159d
commit
bf1b48b940
@ -524,7 +524,9 @@ void Display::update_ekf(uint8_t r)
|
||||
void Display::update_battery(uint8_t r)
|
||||
{
|
||||
char msg [DISPLAY_MESSAGE_SIZE];
|
||||
snprintf(msg, DISPLAY_MESSAGE_SIZE, "BAT1: %4.2fV", (double)AP::battery().voltage()) ;
|
||||
AP_BattMonitor &battery = AP::battery();
|
||||
uint8_t pct = battery.capacity_remaining_pct();
|
||||
snprintf(msg, DISPLAY_MESSAGE_SIZE, "BAT:%4.2fV %2d%% ", (double)battery.voltage(), pct) ;
|
||||
draw_text(COLUMN(0), ROW(r), msg);
|
||||
}
|
||||
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user