You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2023/11/13 16:47:30 UTC

(nuttx-apps) 03/04: examples/foc: raise error if both sensorless and sensored modes enabled

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 87dcf877e70662141922d41e35a1eb4abe7f4338
Author: raiden00pl <ra...@railab.me>
AuthorDate: Wed Nov 8 15:04:54 2023 +0100

    examples/foc: raise error if both sensorless and sensored modes enabled
---
 examples/foc/foc_cfg.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/examples/foc/foc_cfg.h b/examples/foc/foc_cfg.h
index 671d820d3..c9ef8dc1a 100644
--- a/examples/foc/foc_cfg.h
+++ b/examples/foc/foc_cfg.h
@@ -33,6 +33,11 @@
  * Pre-processor Definitions
  ****************************************************************************/
 
+#if defined(CONFIG_EXAMPLES_FOC_SENSORLESS) && \
+  defined(CONFIG_EXAMPLES_FOC_SENSORED)
+#  error Simultaneous support for sensorless and sensored mode not supported
+#endif
+
 /* For now only sensorless velocity control supported */
 
 #ifdef CONFIG_EXAMPLES_FOC_SENSORLESS