Fix the clunk at the end of the open loop flux linkage measurement.

Old code tried to remove all current instantly. New code disabled the pwm first.
This commit is contained in:
ElwinBoots 2021-12-24 12:42:28 +01:00 committed by Kenn Sebesta
parent 5a2382adc8
commit fefa32e7bf
1 changed files with 1 additions and 0 deletions

View File

@ -1076,6 +1076,7 @@ bool conf_general_measure_flux_linkage_openloop(float current, float duty,
mcconf->foc_observer_gain = 0.5e3 / SQ(*linkage);
mc_interface_set_configuration(mcconf);
chThdSleepMilliseconds(500);
mcpwm_foc_stop_pwm(0);
mcpwm_foc_set_current(0.0);
chThdSleepMilliseconds(5);