From e7fad16137d2fb8b133d5354f5da1c60cdefc129 Mon Sep 17 00:00:00 2001 From: Clifford Garwood Date: Wed, 30 Sep 2026 21:00:55 -0400 Subject: [PATCH] State the no-tool pressure advance contract per firmware set_filament_pressure_advance's declaration said -1 omits the tool qualifier, without qualification. That holds on Klipper, Marlin and BBL but not on RepRapFirmware, where no-tool keeps the historical `D0`: a bare M572 applies to whichever tool is selected and errors when none is, so omitting the qualifier would make pressure advance depend on tool-selection state for every RRF user, none of whom are using IMEX. The behavior is deliberate and unchanged; only the declaration overstated it. GCodeWriter::set_pressure_advance and the index-space notes in IMEXHelpers.hpp already described it correctly. Co-Authored-By: Claude Opus 5 (1M context) --- src/libslic3r/GCode.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libslic3r/GCode.hpp b/src/libslic3r/GCode.hpp index d2c410bfd0..fdf55012b1 100644 --- a/src/libslic3r/GCode.hpp +++ b/src/libslic3r/GCode.hpp @@ -291,8 +291,10 @@ public: std::string unretract(float extra_retract = 0.f) { return m_writer.unlift() + m_writer.unretract(extra_retract); } std::string set_extruder(unsigned int extruder_id, double print_z, bool by_object=false, int toolchange_temp_override = -1, bool defer_temp_wait = false); // Sets the pressure advance of the filament's extruder variant, if enabled for it. - // tool addresses one IMEX carriage explicitly; -1 omits the tool qualifier, which is - // what every non-IMEX caller wants and what imex_pem_tool_for() returns off IMEX. + // tool addresses one IMEX carriage explicitly. -1 means no carriage: it omits the tool + // qualifier on Klipper, Marlin and BBL, and keeps RepRapFirmware's historical `D0`, since a + // bare M572 there applies to whatever tool is selected and errors when none is. That is + // what every non-IMEX caller wants, and what imex_pem_tool_for() returns off IMEX. std::string set_filament_pressure_advance(unsigned int filament_id, int tool = -1); bool is_BBL_Printer(); WipeTowerType wipe_tower_type();