From 3aaaeaf3a370958080bf98b93bb58b597b13c14a Mon Sep 17 00:00:00 2001 From: Chas Leichner Date: Fri, 7 May 2021 15:27:50 -0700 Subject: [PATCH] Correct spelling, broken links, and missing parameters in documentation --- CONTRIBUTING | 6 +++--- mcpwm_foc.c | 10 +++++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING b/CONTRIBUTING index 6f987cac..3a64222e 100644 --- a/CONTRIBUTING +++ b/CONTRIBUTING @@ -85,8 +85,8 @@ When making updates it is easy to break things for different configurations. In === Other guidelines === -* Use single precition floating point operations, as the FPU in the STM32F4 is 32 bits only. Double precision operations can take up to 50 times (!) longer. - - float instead if double +* Use single precision floating point operations, as the FPU in the STM32F4 is 32 bits only. Double precision operations can take up to 50 times (!) longer. + - float instead of double - Use the math library functions ending with f (sinf, cosf, powf, fabsf etc.) * Make sure that the code compiles without warnings. @@ -94,7 +94,7 @@ When making updates it is easy to break things for different configurations. In * Avoid dynamic memory allocation if possible, so that the RAM usage is known at compile time. * If the code crashed randomly, use the ChibiOS state checker: -http://www.chibios.org/dokuwiki/doku.php?id=chibios:articles:state_checker +https://www.chibios.org/dokuwiki/doku.php?id=chibios:documentation:books:rt:kernel_debug#system_state_checks === Be patient, and don't take criticism personally === diff --git a/mcpwm_foc.c b/mcpwm_foc.c index 416eacba..ffff65d0 100644 --- a/mcpwm_foc.c +++ b/mcpwm_foc.c @@ -1399,6 +1399,10 @@ void mcpwm_foc_get_current_offsets( * @param current * The locking open loop current for the motor. * + * @param print + * Controls logging during the detection procedure. Set to true to enable + * logging. + * * @param offset * The detected offset. * @@ -1407,6 +1411,10 @@ void mcpwm_foc_get_current_offsets( * * @param direction * The detected direction. + * + * @param inverted + * Is set to true if the encoder reports an increase in angle in the opposite + * direction of the motor. */ void mcpwm_foc_encoder_detect(float current, bool print, float *offset, float *ratio, bool *inverted) { mc_interface_lock(); @@ -1629,7 +1637,7 @@ void mcpwm_foc_encoder_detect(float current, bool print, float *offset, float *r } /** - * Lock the motor with a current and sample the voiltage and current to + * Lock the motor with a current and sample the voltage and current to * calculate the motor resistance. * * @param current