1
0
mirror of https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git synced 2026-07-15 08:44:26 +00:00

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.
This commit is contained in:
Joseph Lenox
2016-07-16 09:52:11 -05:00
committed by bubnikv
parent db30cee6a9
commit abda054720
7 changed files with 30 additions and 9 deletions
+9 -2
View File
@@ -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";