Open 1146116559 opened 2 years ago
This line is comment since I reserve the additional feature for constrain the speed and torque in this application. you can uncomment it and limit the max speed / torque in case if you want the motor have difference speed/ torque in different direction. (line 195 ~ 197) (line 220~ 222)
The default program did not enable the velocity limit feature since I have not use it my latest application, however in the main demo program it is still set in case someone forgot to set the profile_velocity_CW[motor_index] & profile_velocity_CCW[motor_index]
that may result the firmware crash (access the NULL variable) therefore the variable still set in the main init program.
You may open a branch and add the feature u want, then perform pull request if you think this feature.
BTW, this version is not the official robocon used version, the version robocon use is in https://github.com/PolyU-Robocon/C620-C610-controller-PID-code-with-Mbed-STM32-
I found that the
main.cpp
have setted_c620.profile_velocity_CCW[id] =profile_vel;
and_c620.profile_velocity_CW[id] =profile_vel;
at the line 61 and 63.However, in the
c620.cpp
line 197, you have not use this two data// profile_velocity_CW[motor_index], profile_velocity_CCW[motor_index]);
. Is it normal for the new library?