|
|
@@ -308,7 +308,7 @@ void throttle_set_torque(mot_contrl_t * ctrl, float torque) {
|
|
|
/* 处理加速ramp时间的变化,需要缓慢变小,变大可以立即处理,
|
|
|
* 加速时间缓慢变小可以防止突然大扭矩加速
|
|
|
*/
|
|
|
- u16 now_ramp_time = ctrl->input_torque.time;
|
|
|
+ u16 now_ramp_time = mot_contrl_get_torque_acc_time(ctrl);
|
|
|
u16 next_ramp_time = mc_get_gear_config()->accl_time;
|
|
|
if (curr_vel < CONFIG_ZERO_SPEED_RAMP_RMP) {
|
|
|
next_ramp_time = mc_get_gear_config()->zero_accl;
|