From 8bdb78b446e7cd35dcf77aaaca504215f0a72cc2 Mon Sep 17 00:00:00 2001 From: raiden00pl Date: Sun, 15 Oct 2023 10:15:58 +0200 Subject: [PATCH] libdsp/lib_observer.c: use float numbers in all calculations we want to use FPU instructions in calculations not __aeabi --- libs/libdsp/lib_observer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/libdsp/lib_observer.c b/libs/libdsp/lib_observer.c index 43be650bda8..82e0b642168 100644 --- a/libs/libdsp/lib_observer.c +++ b/libs/libdsp/lib_observer.c @@ -612,10 +612,10 @@ void motor_aobserver_nfo(FAR struct motor_aobserver_f32_s *o, * as that makes the angle very unstable. */ - if (vector2d_mag(nfo->x1, nfo->x2) < (phy->flux_link * 0.5)) + if (vector2d_mag(nfo->x1, nfo->x2) < (phy->flux_link * 0.5f)) { - nfo->x1 *= 1.1; - nfo->x2 *= 1.1; + nfo->x1 *= 1.1f; + nfo->x2 *= 1.1f; } angle = fast_atan2(nfo->x2 - l_ib, nfo->x1 - l_ia);