From cf260f6e44c31ccd6a8d9e57158a2adddd4beae0 Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Thu, 11 Feb 2021 11:48:46 +0100 Subject: [PATCH] #6006 - Gcode processor: fixed error prompt for gcode lines Tc, Tx, T? --- src/libslic3r/GCode/GCodeProcessor.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libslic3r/GCode/GCodeProcessor.cpp b/src/libslic3r/GCode/GCodeProcessor.cpp index 52861afba0..5ac9a34c4b 100644 --- a/src/libslic3r/GCode/GCodeProcessor.cpp +++ b/src/libslic3r/GCode/GCodeProcessor.cpp @@ -2340,6 +2340,10 @@ void GCodeProcessor::process_T(const std::string_view command) if (command.length() > 1) { int eid = 0; if (! parse_number(command.substr(1), eid) || eid < 0 || eid > 255) { + // Specific to the MMU2 V2 (see https://www.help.prusa3d.com/en/article/prusa-specific-g-codes_112173): + if (m_flavor == gcfMarlin && (command == "Tx" || command == "Tc" || command == "T?")) + return; + // 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 << ").";