From: Mjolnir Date: Fri, 4 Sep 2015 09:44:03 +0000 (+0200) Subject: fix compatibility between identification and arcs X-Git-Url: https://git.thomaspietrzak.com/?a=commitdiff_plain;h=4b8da604775d7979f04262c978986ae6e0326b10;p=livingdesktop.git fix compatibility between identification and arcs --- diff --git a/GCodeParser/GCodeParser.ino b/GCodeParser/GCodeParser.ino index b9f755b..b4ce07d 100644 --- a/GCodeParser/GCodeParser.ino +++ b/GCodeParser/GCodeParser.ino @@ -116,7 +116,7 @@ void loop() else if (serial_count < COMMAND_SIZE) { commands[serial_count] = c; - serial_count++ + serial_count++; } } else diff --git a/GCodeParser/process_string.ino b/GCodeParser/process_string.ino index 9033296..82dcc73 100644 --- a/GCodeParser/process_string.ino +++ b/GCodeParser/process_string.ino @@ -65,14 +65,13 @@ void process_string(char instruction[], int size) //did we get a gcode? - if (has_command('I', instruction, size)) - { + if (instruction[0] == 'I') Serial.println(F("XYPlotter")); - } - else if (has_command('C', instruction, size)) + else if (instruction[0] == 'C') { init_steppers(); process_string("G90",3);//Absolute Position + process_string("G21",3);//mm units } else if (!has_command('$', instruction, size)&&( has_command('G', instruction, size) ||