|
@@ -122,6 +122,8 @@ u8 mot_contrl_mode(mot_contrl_t *ctrl) {
|
|
|
}else if (preMode == CTRL_MODE_CURRENT) {
|
|
}else if (preMode == CTRL_MODE_CURRENT) {
|
|
|
ctrl->target_torque_raw = line_ramp_get_interp(&ctrl->ramp_target_current);
|
|
ctrl->target_torque_raw = line_ramp_get_interp(&ctrl->ramp_target_current);
|
|
|
PI_Controller_Reset(&ctrl->pi_vel_lim, ctrl->target_torque_raw);
|
|
PI_Controller_Reset(&ctrl->pi_vel_lim, ctrl->target_torque_raw);
|
|
|
|
|
+ }else if (preMode == CTRL_MODE_EBRAKE) {
|
|
|
|
|
+ line_ramp_set_target(&ctrl->ramp_input_torque, 0);
|
|
|
}
|
|
}
|
|
|
}else if ((preMode == CTRL_MODE_TRQ) && (ctrl->mode_running == CTRL_MODE_SPD)) {
|
|
}else if ((preMode == CTRL_MODE_TRQ) && (ctrl->mode_running == CTRL_MODE_SPD)) {
|
|
|
PI_Controller_Reset(&ctrl->pi_vel, ctrl->target_torque);
|
|
PI_Controller_Reset(&ctrl->pi_vel, ctrl->target_torque);
|