|
|
@@ -199,7 +199,7 @@ void thro_torque_process(u8 run_mode, float f_throttle) {
|
|
|
if (thro_r > _torque.thro_ration) {
|
|
|
if (!_torque.accl) {
|
|
|
_torque.thro_ration_last = _torque.thro_ration;
|
|
|
- _torque.torque_real = _torque.torque_req;
|
|
|
+ _torque.torque_real = PMSM_FOC_Get()->in.s_targetCurrent;
|
|
|
if (_torque.torque_real < 0) { //电子刹车的时候,扭矩可能为负
|
|
|
_torque.torque_real = 0;
|
|
|
}
|
|
|
@@ -211,7 +211,10 @@ void thro_torque_process(u8 run_mode, float f_throttle) {
|
|
|
}else if (thro_r < _torque.thro_ration) {
|
|
|
if (_torque.accl) {
|
|
|
_torque.thro_ration_last = _torque.thro_ration;
|
|
|
- _torque.torque_real = _torque.torque_req;
|
|
|
+ _torque.torque_real = PMSM_FOC_Get()->in.s_targetCurrent;
|
|
|
+ if (_torque.torque_real < 0) { //电子刹车的时候,扭矩可能为负
|
|
|
+ _torque.torque_real = 0;
|
|
|
+ }
|
|
|
dec_r = thro_r;
|
|
|
dec_r_last = _torque.thro_ration_last;
|
|
|
dec_trq = _torque.torque_real;
|