File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -308,7 +308,7 @@ void StepperMotor::move(float new_target) {
308
308
shaft_angle_sp = target;
309
309
// calculate velocity set point
310
310
shaft_velocity_sp = feed_forward_velocity + P_angle ( shaft_angle_sp - shaft_angle );
311
- shaft_angle_sp = _constrain (shaft_angle_sp , -velocity_limit, velocity_limit);
311
+ shaft_velocity_sp = _constrain (shaft_velocity_sp , -velocity_limit, velocity_limit);
312
312
// calculate the torque command
313
313
current_sp = PID_velocity (shaft_velocity_sp - shaft_velocity); // if voltage torque control
314
314
// if torque controlled through voltage
@@ -440,4 +440,4 @@ float StepperMotor::angleOpenloop(float target_angle){
440
440
open_loop_timestamp = now_us;
441
441
442
442
return Uq;
443
- }
443
+ }
You can’t perform that action at this time.
0 commit comments