You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2023/10/16 17:46:14 UTC
[nuttx-apps] branch master updated: industry/foc: reset velocity observer output foc_velocity_zero_xx() is called
This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 53b748652 industry/foc: reset velocity observer output foc_velocity_zero_xx() is called
53b748652 is described below
commit 53b74865281d009169900864d9cd83213d389bd1
Author: raiden00pl <ra...@railab.me>
AuthorDate: Mon Oct 16 11:11:46 2023 +0200
industry/foc: reset velocity observer output foc_velocity_zero_xx() is called
---
industry/foc/fixed16/foc_vel_odiv.c | 2 ++
industry/foc/fixed16/foc_vel_opll.c | 2 ++
industry/foc/float/foc_vel_odiv.c | 2 ++
industry/foc/float/foc_vel_opll.c | 2 ++
4 files changed, 8 insertions(+)
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;
}