Rework G10 temperature support to be enabled only for a new Firmware type RepRapFirmware leaving the RepRap/Sprinter behaviour alone. Rename the enum for gcfRepRap to gcfRepRapSprinter and add new gcfRepRapFirmware enum value. Also adds code to only use the G10 searching in custom G-code if the flavour is RepRapFirmware.

This commit is contained in:
Paul Arden 2020-08-21 14:07:50 +10:00
parent e275197518
commit f6d25d0634
7 changed files with 32 additions and 19 deletions

View file

@ -102,7 +102,7 @@ public:
}
WipeTowerWriter& disable_linear_advance() {
m_gcode += (m_gcode_flavor == gcfRepRap
m_gcode += (m_gcode_flavor == gcfRepRapSprinter || m_gcode_flavor == gcfRepRapFirmware
? (std::string("M572 D") + std::to_string(m_current_tool) + " S0\n")
: std::string("M900 K0\n"));
return *this;
@ -351,7 +351,7 @@ public:
// Set digital trimpot motor
WipeTowerWriter& set_extruder_trimpot(int current)
{
if (m_gcode_flavor == gcfRepRap)
if (m_gcode_flavor == gcfRepRapSprinter || m_gcode_flavor == gcfRepRapFirmware)
m_gcode += "M906 E";
else
m_gcode += "M907 E";