industry/foc: reset velocity observer output foc_velocity_zero_xx() is called

This commit is contained in:
raiden00pl 2023-10-16 11:11:46 +02:00 committed by Alan Carvalho de Assis
parent 5a65f3d48f
commit 53b7486528
4 changed files with 8 additions and 0 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}