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:
Sonny J
2011-09-15 20:32:15 -06:00
parent 4d03c4febc
commit 110faae986
5 changed files with 19 additions and 16 deletions

View File

@@ -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