Add debounce counter for UV error detection

This prevents switching off the load output due to short undervoltage
events during startup of pumps etc. when the battery is at low SOC.
This commit is contained in:
Martin Jaeger
2020-02-19 14:34:40 +01:00
committed by Martin Jäger
parent b717dea6d1
commit 68e0336279
4 changed files with 34 additions and 17 deletions
+2
View File
@@ -16,6 +16,7 @@
static void init_structs_buck()
{
dev_stat.error_flags = 0;
hv_terminal.init_solar();
hv_terminal.bus->voltage = 20;
hv_terminal.bus->src_voltage_bound = 18;
@@ -38,6 +39,7 @@ static void init_structs_buck()
static void start_buck()
{
dev_stat.error_flags = 0;
init_structs_buck();
half_bridge_init(70, 200, 12 / dcdc.hs_voltage_max, 0.97);
dcdc.control();