diff --git a/industry/foc/fixed16/foc_vel_odiv.c b/industry/foc/fixed16/foc_vel_odiv.c index 5df851893..a5460fa1d 100644 --- a/industry/foc/fixed16/foc_vel_odiv.c +++ b/industry/foc/fixed16/foc_vel_odiv.c @@ -214,6 +214,8 @@ static int foc_velocity_div_zero_b16(FAR foc_velocity_b16_t *h) div->cfg.filter, div->cfg.per); + div->o.speed = 0; + return ret; } diff --git a/industry/foc/fixed16/foc_vel_opll.c b/industry/foc/fixed16/foc_vel_opll.c index b16cbee1d..36abdd56a 100644 --- a/industry/foc/fixed16/foc_vel_opll.c +++ b/industry/foc/fixed16/foc_vel_opll.c @@ -212,6 +212,8 @@ static int foc_velocity_pll_zero_b16(FAR foc_velocity_b16_t *h) pll->cfg.kp, pll->cfg.ki); + pll->o.speed = 0; + return ret; } diff --git a/industry/foc/float/foc_vel_odiv.c b/industry/foc/float/foc_vel_odiv.c index 43491b5a5..dfb8d820f 100644 --- a/industry/foc/float/foc_vel_odiv.c +++ b/industry/foc/float/foc_vel_odiv.c @@ -214,6 +214,8 @@ static int foc_velocity_div_zero_f32(FAR foc_velocity_f32_t *h) div->cfg.filter, div->cfg.per); + div->o.speed = 0.0f; + return ret; } diff --git a/industry/foc/float/foc_vel_opll.c b/industry/foc/float/foc_vel_opll.c index 0e554848a..a18b6675c 100644 --- a/industry/foc/float/foc_vel_opll.c +++ b/industry/foc/float/foc_vel_opll.c @@ -212,6 +212,8 @@ static int foc_velocity_pll_zero_f32(FAR foc_velocity_f32_t *h) pll->cfg.kp, pll->cfg.ki); + pll->o.speed = 0.0f; + return ret; }