Skip to content

Commit

Permalink
fix set temperature (' S' instead of '=')
Browse files Browse the repository at this point in the history
  • Loading branch information
supermerill committed Feb 4, 2025
1 parent 75c23ad commit 2330ca3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/libslic3r/GCode/GCodeWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,12 @@ std::string GCodeWriter::set_temperature(const int16_t temperature, bool wait, i
if (wait && can_M109) {
code = "M109"sv;
comment = "set temperature and wait for it to be reached"sv;
} else if (FLAVOR_IS(gcfNematX) && tool > 0) {
code = "M124";
} else if (FLAVOR_IS(gcfNematX)) {
if (tool == 0) {
code = "M104"sv;
} else {
code = "M124"sv;
}
comment = "set temperature"sv;
} else {
if (FLAVOR_IS(gcfRepRap)) { // M104 is deprecated on RepRapFirmware
Expand All @@ -298,6 +302,8 @@ std::string GCodeWriter::set_temperature(const int16_t temperature, bool wait, i
} else if (wait && (FLAVOR_IS(gcfMarlinFirmware) || FLAVOR_IS(gcfMarlinLegacy)) &&
temp_w_offset < m_last_temperature_with_offset) {
gcode << " R"; // marlin doesn't wait with S if it's a cooling change, it needs a R
} else if (FLAVOR_IS(gcfNematX)) {
gcode << "=";
} else {
gcode << " S";
}
Expand Down

0 comments on commit 2330ca3

Please sign in to comment.