PWM switch also implemented as class

This commit is contained in:
Martin Jaeger
2019-10-20 22:01:45 +02:00
parent b5c7f396e1
commit 8558cef9cb
8 changed files with 208 additions and 162 deletions
+3
View File
@@ -48,6 +48,9 @@ Dcdc::Dcdc(PowerPort *hv_side, PowerPort *lv_side, DcdcOperationMode op_mode)
restart_interval = 60;
off_timestamp = -10000; // start immediately
pwm_delta = 1; // start-condition of duty cycle pwr_inc_pwm_direction
// lower duty limit might have to be adjusted dynamically depending on LS voltage
half_bridge_init(PWM_FREQUENCY, PWM_DEADTIME, 12 / hs_voltage_max, 0.97);
}
int Dcdc::duty_cycle_delta()