This is an automated email from the ASF dual-hosted git repository.

xiaoxiang 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 6a814dd41 industry/foc/nfo: use float numbers in all calculations
6a814dd41 is described below

commit 6a814dd41f159e57f7e7544da943f0cdb56b2a59
Author: raiden00pl <raide...@railab.me>
AuthorDate: Sun Oct 15 10:20:57 2023 +0200

    industry/foc/nfo: use float numbers in all calculations
    
    we want to use FPU instructions in calculations not __aeabi
---
 industry/foc/float/foc_ang_onfo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/industry/foc/float/foc_ang_onfo.c 
b/industry/foc/float/foc_ang_onfo.c
index 14149de31..39e2227be 100644
--- a/industry/foc/float/foc_ang_onfo.c
+++ b/industry/foc/float/foc_ang_onfo.c
@@ -291,8 +291,8 @@ static int foc_angle_onfo_run_f32(FAR foc_angle_f32_t *h,
 
   /* Update and the observer gain. */
 
-  dyn_gain = LINEAR_MAP(fabsf(duty_now), 0.0, 1.0,
-             ob->cfg.gain * ob->cfg.gain_slow, ob->cfg.gain) * 0.5;
+  dyn_gain = LINEAR_MAP(fabsf(duty_now), 0.0f, 1.0f,
+             ob->cfg.gain * ob->cfg.gain_slow, ob->cfg.gain) * 0.5f;
 
   /* Update observer */
 

Reply via email to