From 11fa9e47ab8fd09a1b02c46b40e2f073e6b7a756 Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Tue, 8 Nov 2016 10:13:28 -0600 Subject: [PATCH 1/2] Fix to output correct set & wait gcode for Sailfish and MakerWare. Fixes #3546 and reimplements #3547 --- xs/src/libslic3r/GCodeWriter.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xs/src/libslic3r/GCodeWriter.cpp b/xs/src/libslic3r/GCodeWriter.cpp index d256ab2af0..a7a52cc1af 100644 --- a/xs/src/libslic3r/GCodeWriter.cpp +++ b/xs/src/libslic3r/GCodeWriter.cpp @@ -78,11 +78,9 @@ GCodeWriter::postamble() const std::string GCodeWriter::set_temperature(unsigned int temperature, bool wait, int tool) const { - if (wait && (FLAVOR_IS(gcfMakerWare) || FLAVOR_IS(gcfSailfish))) - return ""; std::string code, comment; - if (wait && FLAVOR_IS_NOT(gcfTeacup)) { + if (wait && FLAVOR_IS_NOT(gcfTeacup) && FLAVOR_IS_NOT(gcfMakerWare) && FLAVOR_IS_NOT(gcfSailfish)) { code = "M109"; comment = "set temperature and wait for it to be reached"; } else { @@ -106,6 +104,9 @@ GCodeWriter::set_temperature(unsigned int temperature, bool wait, int tool) cons if (FLAVOR_IS(gcfTeacup) && wait) gcode << "M116 ; wait for temperature to be reached\n"; + if (wait && tool !=-1 && (FLAVOR_IS(gcfMakerWare) || FLAVOR_IS(gcfSailfish))) + gcode << "M6 T" << tool << " ; wait for temperature to be reached\n"; + return gcode.str(); } From d066f60964259b5967ea5265645285760081892d Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Tue, 8 Nov 2016 10:15:05 -0600 Subject: [PATCH 2/2] Pass in tool ID for toolchange temperature delta. Fixes #3546 and reimplements #3547 for master --- xs/src/libslic3r/GCode.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index 41a8671a6b..8780ef61e3 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -98,7 +98,7 @@ OozePrevention::pre_toolchange(GCode &gcodegen) if (gcodegen.config.standby_temperature_delta.value != 0) { // we assume that heating is always slower than cooling, so no need to block gcode += gcodegen.writer.set_temperature - (this->_get_temp(gcodegen) + gcodegen.config.standby_temperature_delta.value, false); + (this->_get_temp(gcodegen) + gcodegen.config.standby_temperature_delta.value, false, gcodegen.writer.extruder()->id); } return gcode; @@ -110,7 +110,7 @@ OozePrevention::post_toolchange(GCode &gcodegen) std::string gcode; if (gcodegen.config.standby_temperature_delta.value != 0) { - gcode += gcodegen.writer.set_temperature(this->_get_temp(gcodegen), true); + gcode += gcodegen.writer.set_temperature(this->_get_temp(gcodegen), true, gcodegen.writer.extruder()->id); } return gcode;