diff --git a/src/switch_control.rs b/src/switch_control.rs index 286f8f2..140246b 100644 --- a/src/switch_control.rs +++ b/src/switch_control.rs @@ -279,7 +279,7 @@ pub struct SwitchControl mode_switch_delay_counter: u32, cv_pid: PID<10000, T0>, mppt: MPPT<200, 0 /* percent loss of peak power */>, - imp_ctrl: ImpedanceControl, + imp_ctrl: ImpedanceControl, pwm_max: i32, pwm_cur: i32, cv_target: i32, @@ -295,7 +295,7 @@ impl SwitchControl mode_switch_delay_counter: 0, cv_pid: PID::<10000, T0>::new(100, 50, 50, cv_target, 0, 0, pwm_max * 10000), mppt: MPPT::<200, 0>::new(3*pwm_max/4, 0, pwm_max), - imp_ctrl: ImpedanceControl::::new(1000, pwm_max), + imp_ctrl: ImpedanceControl::::new(1000, pwm_max), pwm_max, pwm_cur: 0, cv_target,