diff options
author | Joseph Lenox <lenox.joseph@gmail.com> | 2016-07-16 17:52:11 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2017-02-10 11:39:19 +0300 |
commit | abda05472081e5fe831135ac72b14791bd35fbd1 (patch) | |
tree | 30f50cd514f9c5fea5d9e878b7cb3906090dcc55 /xs/src/libslic3r/GCodeWriter.cpp | |
parent | db30cee6a9b914778d0adfcbefbb86e7da9dd680 (diff) |
Cherry-picked Repetier acceleration fixes, thanks to @lordofhyphens
https://github.com/lordofhyphens/Slic3r/commit/e0d8101627659ef2dcf1c49d5c9b512eb4e31a46
https://github.com/lordofhyphens/Slic3r/commit/885f27b8aea0df8be351825b9dd6061696f5edc9
Added a printer settings to enable / disable variable layer height editing.
Diffstat (limited to 'xs/src/libslic3r/GCodeWriter.cpp')
-rw-r--r-- | xs/src/libslic3r/GCodeWriter.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/xs/src/libslic3r/GCodeWriter.cpp b/xs/src/libslic3r/GCodeWriter.cpp index bb74ff124..ab92c6f36 100644 --- a/xs/src/libslic3r/GCodeWriter.cpp +++ b/xs/src/libslic3r/GCodeWriter.cpp @@ -41,7 +41,7 @@ GCodeWriter::preamble() gcode << "G21 ; set units to millimeters\n"; gcode << "G90 ; use absolute coordinates\n"; } - if (FLAVOR_IS(gcfRepRap) || FLAVOR_IS(gcfTeacup)) { + if (FLAVOR_IS(gcfRepRap) || FLAVOR_IS(gcfTeacup) || FLAVOR_IS(gcfRepetier) || FLAVOR_IS(gcfSmoothie)) { if (this->config.use_relative_e_distances) { gcode << "M83 ; use relative distances for extrusion\n"; } else { @@ -172,7 +172,14 @@ GCodeWriter::set_acceleration(unsigned int acceleration) this->_last_acceleration = acceleration; std::ostringstream gcode; - gcode << "M204 S" << acceleration; + if (FLAVOR_IS(gcfRepetier)) { + gcode << "M201 X" << acceleration << " Y" << acceleration; + if (this->config.gcode_comments) gcode << " ; adjust acceleration"; + gcode << "\n"; + gcode << "M202 X" << acceleration << " Y" << acceleration; + } else { + gcode << "M204 S" << acceleration; + } if (this->config.gcode_comments) gcode << " ; adjust acceleration"; gcode << "\n"; |