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/incubator-nuttx-apps.git

commit 9076c899d4931c14effbc3f494174c644840cb9b
Author: raiden00pl <[email protected]>
AuthorDate: Thu Nov 4 16:44:05 2021 +0100

    industry/foc/fixed16/foc_align.c: fix incorrect b16_t operations
---
 industry/foc/fixed16/foc_align.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/industry/foc/fixed16/foc_align.c b/industry/foc/fixed16/foc_align.c
index 43dcdb5..442fda6 100644
--- a/industry/foc/fixed16/foc_align.c
+++ b/industry/foc/fixed16/foc_align.c
@@ -46,10 +46,10 @@
 
 #define ALIGN_DIR_ANGLE_STEP   (ftob16(0.001f))
 #define ALIGN_DIR_ANGLE_HOLD_0 (ftob16(0.0f))
-#define ALIGN_DIR_ANGLE_HOLD_1 (b16idiv(b16PI, 3))
-#define ALIGN_DIR_ANGLE_HOLD_2 (b16muli(b16idiv(b16PI, 3), 2))
+#define ALIGN_DIR_ANGLE_HOLD_1 (b16divi(b16PI, 3))
+#define ALIGN_DIR_ANGLE_HOLD_2 (b16muli(b16divi(b16PI, 3), 2))
 #define ALIGN_DIR_ANGLE_HOLD_3 (b16PI)
-#define ALIGN_DIR_ANGLE_HOLD_4 (b16muli(b16idiv(b16PI, 3), 4))
+#define ALIGN_DIR_ANGLE_HOLD_4 (b16muli(b16divi(b16PI, 3), 4))
 #define ALIGN_DIR_HOLD_CNTR    (10)
 
 /* IDLE steps */

Reply via email to