Removed comment and block delete handling from gcode.c. Parser expects clean gcode.
This commit is contained in:
parent
ea5b8942db
commit
fdc90f1821
7
gcode.c
7
gcode.c
@ -117,7 +117,8 @@ static double theta(double x, double y)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Executes one line of 0-terminated G-Code. The line is assumed to contain only uppercase
|
// Executes one line of 0-terminated G-Code. The line is assumed to contain only uppercase
|
||||||
// characters and signed floating point values (no whitespace).
|
// characters and signed floating point values (no whitespace). Comments and block delete
|
||||||
|
// characters have been removed.
|
||||||
uint8_t gc_execute_line(char *line) {
|
uint8_t gc_execute_line(char *line) {
|
||||||
uint8_t char_counter = 0;
|
uint8_t char_counter = 0;
|
||||||
char letter;
|
char letter;
|
||||||
@ -139,10 +140,6 @@ uint8_t gc_execute_line(char *line) {
|
|||||||
|
|
||||||
gc.status_code = STATUS_OK;
|
gc.status_code = STATUS_OK;
|
||||||
|
|
||||||
// Disregard comments and block delete
|
|
||||||
if (line[0] == '(') { return(gc.status_code); }
|
|
||||||
if (line[0] == '/') { char_counter++; } // ignore block delete
|
|
||||||
|
|
||||||
// Pass 1: Commands
|
// Pass 1: Commands
|
||||||
while(next_statement(&letter, &value, line, &char_counter)) {
|
while(next_statement(&letter, &value, line, &char_counter)) {
|
||||||
int_value = trunc(value);
|
int_value = trunc(value);
|
||||||
|
Loading…
Reference in New Issue
Block a user