Fix of #3965 (properly disable linear advance with RepRap firmware)

This commit is contained in:
Lukas Matena 2020-04-03 09:07:58 +02:00
parent a3646f843c
commit 35c8c84631

View file

@ -102,7 +102,9 @@ public:
}
WipeTowerWriter& disable_linear_advance() {
m_gcode += (m_gcode_flavor == gcfRepRap ? std::string("M572 D0 S0\n") : std::string("M900 K0\n"));
m_gcode += (m_gcode_flavor == gcfRepRap
? (std::string("M572 D") + std::to_string(m_current_tool) + " S0\n")
: std::string("M900 K0\n"));
return *this;
}