From d37fee8e829f83a28acddfb0ddf1ae61bd8ad975 Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Sun, 6 Mar 2011 19:58:16 +0100 Subject: [PATCH] gcode_process.c: there's no point in setting E on a G92 ... ... as E is always relative. Saves 90 bytes binary size. --- gcode_process.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/gcode_process.c b/gcode_process.c index 272566e..36decbc 100644 --- a/gcode_process.c +++ b/gcode_process.c @@ -225,15 +225,12 @@ void process_gcode_command() { startpoint.Z = current_position.Z = next_target.target.Z; axisSelected = 1; } - if (next_target.seen_E) { - startpoint.E = current_position.E = next_target.target.E; - axisSelected = 1; - } + // there's no point in setting E, as E is always relative + if (axisSelected == 0) { startpoint.X = current_position.X = startpoint.Y = current_position.Y = - startpoint.Z = current_position.Z = - startpoint.E = current_position.E = 0; + startpoint.Z = current_position.Z = 0; } break;