Fixing load overvoltage protection (closes #27)

This commit is contained in:
Martin Jaeger
2019-06-25 09:14:57 +02:00
parent 14faa1f0e8
commit 26ae254ec4
11 changed files with 29 additions and 19 deletions
+2 -2
View File
@@ -80,7 +80,7 @@ void system_control()
leds_set_charging(half_bridge_enabled());
#endif
load_control(&load);
load_control(&load, bat_conf.voltage_absolute_max * charger.num_batteries);
if (counter % CONTROL_FREQUENCY == 0) {
// called once per second (this timer is much more accurate than time(NULL) based on LSI)
@@ -137,7 +137,7 @@ int main()
#ifdef UART_SERIAL_ENABLED
thingset_serial_init(&serial);
#endif
#ifdef CAN_ENABLED
ts_can.enable();
#endif