Update of DC/DC lv side targets based on bat + load

This commit is contained in:
Martin Jaeger
2019-10-15 16:46:24 +02:00
parent 25e469516c
commit 6d91e075b3
3 changed files with 17 additions and 0 deletions
+11
View File
@@ -441,3 +441,14 @@ void battery_init_dc_bus(DcBus *bus, BatConf *bat, unsigned int num_batteries)
// negative sign for compensation of actual resistance
bus->chg_droop_res = -bat->wire_resistance * n;
}
void charger_update_junction_bus(DcBus *junction, DcBus *bat, DcBus *load)
{
// relevant for DC/DC
junction->chg_current_max = bat->chg_current_max - bat->current + load->current;
junction->chg_voltage_target = bat->chg_voltage_target;
// relevant for load output
junction->dis_voltage_start = bat->dis_voltage_start;
junction->dis_voltage_stop = bat->dis_voltage_stop;
}