abs_max fix for dual motors

This commit is contained in:
Benjamin Vedder 2022-12-02 09:55:50 +01:00
parent 398b76adc6
commit fbd39c020c
1 changed files with 1 additions and 1 deletions

View File

@ -1882,7 +1882,7 @@ int conf_general_detect_apply_all_foc(float max_power_loss,
#ifdef HW_HAS_DUAL_MOTORS
mcconf_old_second->l_current_max = r_l_imax_args.i_max;
mcconf_old_second->l_current_min = -r_l_imax_args.i_max;
float abs_max = r_l_imax_args.i_max * 1.5;
abs_max = r_l_imax_args.i_max * 1.5;
utils_truncate_number(&abs_max, HW_LIM_CURRENT_ABS);
mcconf_old_second->l_abs_current_max = abs_max;
mcconf_old_second->motor_type = MOTOR_TYPE_FOC;