From 969607ac44bba36119145c764fa72d108ccc76d0 Mon Sep 17 00:00:00 2001 From: raiden00pl Date: Tue, 10 Oct 2023 13:16:33 +0200 Subject: [PATCH] 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 */