DC bus integrated into PowerPort class
Reason: Previous idea with storing the voltage only once and not in every port doesn't work well for droop settings, e.g. the DC/DC output port doesn't know the actual battery current, which should be used to calculate the droop caued by wire resistance.
This commit is contained in:
@@ -100,18 +100,18 @@ void uext_process_1s()
|
||||
oled.printf("n/a");
|
||||
}
|
||||
#ifndef CHARGER_TYPE_PWM
|
||||
if (solar_terminal.bus->voltage > bat_terminal.bus->voltage)
|
||||
if (solar_terminal.voltage > bat_terminal.voltage)
|
||||
#endif
|
||||
{
|
||||
oled.setTextCursor(0, 26);
|
||||
oled.printf("%4.1fV", solar_terminal.bus->voltage);
|
||||
oled.printf("%4.1fV", solar_terminal.voltage);
|
||||
}
|
||||
|
||||
// battery data
|
||||
oled.setTextCursor(42, 18);
|
||||
oled.printf("%5.1fW", (abs(bat_terminal.power) < 0.1) ? 0 : bat_terminal.power); // remove negative zeros
|
||||
oled.setTextCursor(42, 26);
|
||||
oled.printf("%5.1fV", bat_terminal.bus->voltage);
|
||||
oled.printf("%5.1fV", bat_terminal.voltage);
|
||||
|
||||
// load data
|
||||
oled.setTextCursor(90, 18);
|
||||
|
||||
Reference in New Issue
Block a user