More '%' modulo opertor removals and some housecleaning.
- Serial functions contained quite a few modulo operations that would be executed with high frequency when streaming. AVR processors are very slow when operating these. In one test on the Arduino forums, it showed about a 15x slow down compared to a simple if-then statement. - Clarified some variable names and types and comments.
This commit is contained in:
parent
4d03c4febc
commit
110faae986
5 changed files with 19 additions and 16 deletions
2
gcode.c
2
gcode.c
|
|
@ -328,7 +328,7 @@ uint8_t gc_execute_line(char *line) {
|
|||
}
|
||||
|
||||
// Set clockwise/counter-clockwise sign for mc_arc computations
|
||||
int8_t isclockwise = false;
|
||||
uint8_t isclockwise = false;
|
||||
if (gc.motion_mode == MOTION_MODE_CW_ARC) { isclockwise = true; }
|
||||
|
||||
// Trace the arc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue