Bugfix to stop hard braking at high speeds

This commit is contained in:
2022-04-10 14:16:43 +02:00
parent c125ba18f4
commit d18ca7b4d7

View File

@ -2124,7 +2124,7 @@ void BLDC_controller_step(RT_MODEL *const rtM)
* Sum: '<S42>/Sum1' * Sum: '<S42>/Sum1'
* Sum: '<S42>/Sum3' * Sum: '<S42>/Sum3'
*/ */
rtb_Divide14_e = (uint16_T)(((int16_T)(DataTypeConversion2 - rtb_Divide14_e = (uint16_T)(((int16_T)(rtP->r_fieldWeakHi -
rtP->r_fieldWeakLo) << 15) / (int16_T)(rtP->r_fieldWeakHi - rtP->r_fieldWeakLo) << 15) / (int16_T)(rtP->r_fieldWeakHi -
rtP->r_fieldWeakLo)); rtP->r_fieldWeakLo));