Skip to content

Commit

Permalink
Correct spelling, broken links, and missing parameters in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Chas Leichner committed May 7, 2021
1 parent 31a3131 commit 3aaaeaf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
6 changes: 3 additions & 3 deletions CONTRIBUTING
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,16 @@ 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.

* 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 ===
Expand Down
10 changes: 9 additions & 1 deletion mcpwm_foc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand All @@ -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();
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3aaaeaf

Please sign in to comment.