From 6a814dd41f159e57f7e7544da943f0cdb56b2a59 Mon Sep 17 00:00:00 2001 From: raiden00pl Date: Sun, 15 Oct 2023 10:20:57 +0200 Subject: [PATCH] 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 */