File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -575,6 +575,7 @@ void HFIBLDCMotor::move(float new_target) {
575
575
// calculate velocity set point
576
576
temp_q_setpoint = feed_forward_velocity + P_angle ( shaft_angle_sp - shaft_angle );
577
577
temp_q_setpoint = _constrain (temp_q_setpoint,-current_limit, current_limit);
578
+ temp_q_setpoint = LPF_angle (temp_q_setpoint);
578
579
// calculate the torque command - sensor precision: this calculation is ok, but based on bad value from previous calculation
579
580
noInterrupts ();
580
581
current_setpoint.q = temp_q_setpoint;
@@ -595,6 +596,7 @@ void HFIBLDCMotor::move(float new_target) {
595
596
// calculate the torque command
596
597
temp_q_setpoint = PID_velocity (shaft_velocity_sp - hfi_velocity); // if current/foc_current torque control
597
598
temp_q_setpoint = _constrain (temp_q_setpoint,-current_limit, current_limit);
599
+ temp_q_setpoint = LPF_velocity (temp_q_setpoint);
598
600
noInterrupts ();
599
601
current_setpoint.q = temp_q_setpoint;
600
602
interrupts ();
You can’t perform that action at this time.
0 commit comments