diff options
author | enricoturri1966 <enricoturri@seznam.cz> | 2021-01-04 14:51:47 +0300 |
---|---|---|
committer | Lukas Matena <lukasmatena@seznam.cz> | 2021-01-04 16:21:24 +0300 |
commit | 4d3cb19423e75b4193633704bc1d3fcb5358e872 (patch) | |
tree | b6ff7a7f1a83a277472cbaf05b918519d8336c11 | |
parent | 016042db107e4ebf2a2d2f2feb8ebf0e31e81232 (diff) |
5677 - GCodeProcessor accepts gcode line T-1 as valid for RepRapFirmware and RepRapSprinter
-rw-r--r-- | src/libslic3r/GCode/GCodeProcessor.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libslic3r/GCode/GCodeProcessor.cpp b/src/libslic3r/GCode/GCodeProcessor.cpp index b2900a157..d553d727a 100644 --- a/src/libslic3r/GCode/GCodeProcessor.cpp +++ b/src/libslic3r/GCode/GCodeProcessor.cpp @@ -2345,7 +2345,9 @@ void GCodeProcessor::process_T(const std::string_view command) if (command.length() > 1) { int eid; if (! parse_number(command.substr(1), eid) || eid < 0 || eid > 255) { - BOOST_LOG_TRIVIAL(error) << "GCodeProcessor encountered an invalid toolchange (" << command << ")."; + // T-1 is a valid gcode line for RepRap Firmwares (used to deselects all tools) see https://github.com/prusa3d/PrusaSlicer/issues/5677 + if ((m_flavor != gcfRepRapFirmware && m_flavor != gcfRepRapSprinter) || eid != -1) + BOOST_LOG_TRIVIAL(error) << "GCodeProcessor encountered an invalid toolchange (" << command << ")."; } else { unsigned char id = static_cast<unsigned char>(eid); if (m_extruder_id != id) { |