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

commit 5c166edf631416cd30355327bb8bd6c451d2f4cb
Author: raiden00pl <raide...@railab.me>
AuthorDate: Thu Oct 17 14:01:53 2024 +0200

    examples/foc: fix compilation error
    
    fix compilatgion error:
    
    foc_motor_f32.c: In function 'foc_motor_init':
    foc_motor_f32.c:1574:7: error: label 'errout' used but not defined
     1574 |       goto errout;
---
 examples/foc/foc_motor_b16.c | 5 +++--
 examples/foc/foc_motor_f32.c | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/examples/foc/foc_motor_b16.c b/examples/foc/foc_motor_b16.c
index 91beaa060..aeee136a0 100644
--- a/examples/foc/foc_motor_b16.c
+++ b/examples/foc/foc_motor_b16.c
@@ -1665,8 +1665,9 @@ int foc_motor_init(FAR struct foc_motor_b16_s *motor,
       motor->ctrl_state = FOC_CTRL_STATE_INIT;
     }
 
-#if defined(CONFIG_EXAMPLES_FOC_SENSORED) ||  \
-    defined(CONFIG_EXAMPLES_FOC_HAVE_RUN) ||  \
+#if defined(CONFIG_EXAMPLES_FOC_SENSORED)   || \
+    defined(CONFIG_EXAMPLES_FOC_HAVE_RUN)   || \
+    defined(CONFIG_EXAMPLES_FOC_HAVE_ALIGN) || \
     defined(CONFIG_EXAMPLES_FOC_HAVE_IDENT)
 errout:
 #endif
diff --git a/examples/foc/foc_motor_f32.c b/examples/foc/foc_motor_f32.c
index 18d11648d..be9abca0e 100644
--- a/examples/foc/foc_motor_f32.c
+++ b/examples/foc/foc_motor_f32.c
@@ -1655,8 +1655,9 @@ int foc_motor_init(FAR struct foc_motor_f32_s *motor,
       motor->ctrl_state = FOC_CTRL_STATE_INIT;
     }
 
-#if defined(CONFIG_EXAMPLES_FOC_SENSORED) ||  \
-    defined(CONFIG_EXAMPLES_FOC_HAVE_RUN) ||  \
+#if defined(CONFIG_EXAMPLES_FOC_SENSORED)   || \
+    defined(CONFIG_EXAMPLES_FOC_HAVE_RUN)   || \
+    defined(CONFIG_EXAMPLES_FOC_HAVE_ALIGN) || \
     defined(CONFIG_EXAMPLES_FOC_HAVE_IDENT)
 errout:
 #endif

Reply via email to