support klipper gcode flavor

This commit is contained in:
SoftFever 2022-10-23 19:42:01 +08:00
parent ff760815ca
commit cd71a86d3f
6 changed files with 24 additions and 13 deletions

View file

@ -99,8 +99,7 @@ public:
}
WipeTowerWriter& disable_linear_advance() {
m_gcode += (m_gcode_flavor == gcfRepRapSprinter || m_gcode_flavor == gcfRepRapFirmware
? (std::string("M572 D") + std::to_string(m_current_tool) + " S0\n")
m_gcode += (m_gcode_flavor == gcfKlipper ? (std::string("SET_PRESSURE_ADVANCE ADVANCE=0\n"))
: std::string("M900 K0\n"));
return *this;
}