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 969607ac44bba36119145c764fa72d108ccc76d0 Author: raiden00pl <raide...@railab.me> AuthorDate: Tue Oct 10 13:16:33 2023 +0200 examples/foc: fix setpoint scale for char interface --- examples/foc/foc_cfg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/foc/foc_cfg.h b/examples/foc/foc_cfg.h index 44f46c4ab..14a1d1a47 100644 --- a/examples/foc/foc_cfg.h +++ b/examples/foc/foc_cfg.h @@ -180,7 +180,7 @@ /* CHARCTRL setpoint control */ #ifdef CONFIG_EXAMPLES_FOC_SETPOINT_CHAR -# define SETPOINT_ADC_SCALE (1 / 1000.0f) +# define SETPOINT_ADC_SCALE (1.0f / (CONFIG_EXAMPLES_FOC_SETPOINT_MAX / 1000.0f)) #endif /* VBUS source must be specified */