Move voltage control parameters to DcBus class

The sink and source voltage boundaries for droop control and battery
charge voltage management are now part of the DcBus class.
Also added source and sink current margins, which will be used by the
DC/DC for control targets instead of port current limits, which were
difficult to synchronize before.
This commit is contained in:
Martin Jaeger
2020-02-07 12:03:25 +01:00
parent a7d6dbc3b5
commit 43f90eea7c
16 changed files with 421 additions and 390 deletions
+1 -2
View File
@@ -14,8 +14,7 @@
static void init_structs()
{
battery_conf_init(&bat_conf, BAT_TYPE_FLOODED, 6, 100);
//charger_init(&charger);
battery_init_dc_bus(&bat_terminal, &bat_conf, 1);
battery_init_terminal(&bat_terminal, &bat_conf, 1);
charger.state = CHG_STATE_IDLE;
charger.bat_temperature = 25;
bat_terminal.bus->voltage = 14.0;