|
|
@@ -674,6 +674,7 @@ bool mc_start_epm_move(epm_dir_t dir, bool is_command) {
|
|
|
|
|
|
if (!mot_contrl_is_start(&motor.controller)) {
|
|
|
mot_contrl_start(&motor.controller, motor.mode);
|
|
|
+ mc_gear_vmode_changed();
|
|
|
pwm_enable_channel();
|
|
|
}else if (mot_contrl_is_auto_holdding(&motor.controller)) {
|
|
|
mc_auto_hold(false);
|
|
|
@@ -1349,16 +1350,14 @@ static void mc_process_epm_move(void) {
|
|
|
}
|
|
|
float target_vel = mc_conf()->c.max_epm_rpm;
|
|
|
float target_trq = mc_conf()->c.max_epm_torque;
|
|
|
- float step = 0.05f;
|
|
|
if (motor.epm_dir == EPM_Dir_Back) {
|
|
|
target_vel = -mc_conf()->c.max_epm_back_rpm;
|
|
|
target_trq = mc_conf()->c.max_epm_back_torque;
|
|
|
}else if (!motor.b_epm_cmd_move) {
|
|
|
target_vel = throttle_vol_to_open_ration(throttle_get_signal()) * 2.0f * (float)target_vel;
|
|
|
- step = 0.07f;
|
|
|
}
|
|
|
- step_towards(&motor.f_epm_vel, target_vel, step);
|
|
|
motor.f_epm_trq = target_trq;
|
|
|
+ motor.f_epm_vel = target_vel;
|
|
|
mot_contrl_set_torque_limit(&motor.controller, motor.f_epm_trq);
|
|
|
mot_contrl_set_target_vel(&motor.controller, motor.f_epm_vel);
|
|
|
}
|
|
|
@@ -1496,7 +1495,6 @@ static void mc_process_throttle_torque(float vol) {
|
|
|
if (mot_contrl_energy_recovery(&motor.controller, true)) {
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
if (motor.controller.mode_running == CTRL_MODE_TRQ) {
|