From 94e673e0508999830b14f8509cba257de0d38ce4 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Fri, 24 Feb 2012 23:12:16 +0100 Subject: [PATCH] Backwards compatibility for people using relative E distances on RepRap firmwares --- lib/Slic3r/Print.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/Slic3r/Print.pm b/lib/Slic3r/Print.pm index 03da5dd2f..3a1101131 100644 --- a/lib/Slic3r/Print.pm +++ b/lib/Slic3r/Print.pm @@ -547,8 +547,12 @@ sub export_gcode { print $fh "G21 ; set units to millimeters\n"; if ($Slic3r::gcode_flavor =~ /^(?:reprap|teacup|makerbot)$/) { printf $fh "G92 %s0 ; reset extrusion distance\n", $Slic3r::extrusion_axis; - if (!$Slic3r::use_relative_e_distances && $Slic3r::gcode_flavor =~ /^(?:reprap|makerbot)$/) { - print $fh "M82 ; use absolute distances for extrusion\n"; + if ($Slic3r::gcode_flavor =~ /^(?:reprap|makerbot)$/) { + if ($Slic3r::use_relative_e_distances) { + print $fh "M83 ; use relative distances for extrusion\n"; + } else { + print $fh "M82 ; use absolute distances for extrusion\n"; + } } }