Charger.num_batteries moved to DcBus.series_multiplier

The reason is that the voltage disconnect thresholds used in the load outputs
need to be multiplied with number of batteries aswell. As the DcBus class
should contain all voltage-relevant information, it is the right place for the
multiplier.
This commit is contained in:
Martin Jäger
2020-03-01 09:48:35 +01:00
parent 651f66616b
commit 1a9c290485
9 changed files with 72 additions and 62 deletions
+1 -1
View File
@@ -179,7 +179,7 @@ void PwmSwitch::control()
off_timestamp = uptime();
print_info("PWM charger stop.\n");
}
else if (bus->voltage > bus->sink_droop_voltage() // bus voltage above target
else if (bus->voltage > bus->sink_control_voltage() // bus voltage above target
|| current < neg_current_limit // port current limit exceeded
|| current < -PWM_CURRENT_MAX) // PCB current limit exceeded
{