mirror of
https://github.com/pelgraine/Meck.git
synced 2026-08-06 16:52:46 +02:00
battery charge estimated runtime fix - 2 to 3 charge discharge cycles needed for full calibration to 1400mah
This commit is contained in:
@@ -606,6 +606,20 @@ public:
|
||||
display.drawTextLeftAlign(0, y, "voltage");
|
||||
sprintf(buf, "%d.%03d V", mv / 1000, mv % 1000);
|
||||
display.drawTextRightAlign(display.width()-1, y, buf);
|
||||
y += 10;
|
||||
|
||||
// Remaining capacity
|
||||
uint16_t remCap = board.getRemainingCapacity();
|
||||
display.drawTextLeftAlign(0, y, "remaining cap");
|
||||
sprintf(buf, "%d mAh", remCap);
|
||||
display.drawTextRightAlign(display.width()-1, y, buf);
|
||||
y += 10;
|
||||
|
||||
// Full charge capacity (learned value)
|
||||
uint16_t fullCap = board.getFullChargeCapacity();
|
||||
display.drawTextLeftAlign(0, y, "full charge cap");
|
||||
sprintf(buf, "%d mAh", fullCap);
|
||||
display.drawTextRightAlign(display.width()-1, y, buf);
|
||||
#endif
|
||||
} else if (_page == HomePage::SHUTDOWN) {
|
||||
display.setColor(DisplayDriver::GREEN);
|
||||
|
||||
Reference in New Issue
Block a user