Rename DC/DC operation mode and control names

New control states allow to specify the reason for derating more detailed,
also considering the input side.

The operation mode is now also used as a return value for
check_start_conditions function to get rid of magic numbers.
This commit is contained in:
Martin Jäger
2020-10-14 10:03:34 +02:00
parent c38f1c8348
commit db9c9c5b1c
6 changed files with 115 additions and 76 deletions
+3 -3
View File
@@ -33,11 +33,11 @@ DcBus hv_bus;
PowerPort hv_terminal(&hv_bus, true); // high voltage terminal (solar for typical MPPT)
PowerPort dcdc_lv_port(&lv_bus); // internal low voltage side of DC/DC converter
#if CONFIG_HV_TERMINAL_NANOGRID
Dcdc dcdc(&hv_terminal, &dcdc_lv_port, MODE_NANOGRID);
Dcdc dcdc(&hv_terminal, &dcdc_lv_port, DCDC_MODE_AUTO);
#elif CONFIG_HV_TERMINAL_BATTERY
Dcdc dcdc(&hv_terminal, &dcdc_lv_port, MODE_MPPT_BOOST);
Dcdc dcdc(&hv_terminal, &dcdc_lv_port, DCDC_MODE_BOOST);
#else
Dcdc dcdc(&hv_terminal, &dcdc_lv_port, MODE_MPPT_BUCK);
Dcdc dcdc(&hv_terminal, &dcdc_lv_port, DCDC_MODE_BUCK);
#endif // CONFIG_HV_TERMINAL
#endif