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

@ -953,6 +953,7 @@ void PrintConfigDef::init_fff_params()
"The \"No extrusion\" flavor prevents PrusaSlicer from exporting any extrusion value at all.");
def->enum_keys_map = &ConfigOptionEnum<GCodeFlavor>::get_enum_values();
def->enum_values.push_back("reprap");
def->enum_values.push_back("reprapfirmware");
def->enum_values.push_back("repetier");
def->enum_values.push_back("teacup");
def->enum_values.push_back("makerware");
@ -963,6 +964,7 @@ void PrintConfigDef::init_fff_params()
def->enum_values.push_back("smoothie");
def->enum_values.push_back("no-extrusion");
def->enum_labels.push_back("RepRap/Sprinter");
def->enum_labels.push_back("RepRapFirmware");
def->enum_labels.push_back("Repetier");
def->enum_labels.push_back("Teacup");
def->enum_labels.push_back("MakerWare (MakerBot)");
@ -973,7 +975,7 @@ void PrintConfigDef::init_fff_params()
def->enum_labels.push_back("Smoothie");
def->enum_labels.push_back(L("No extrusion"));
def->mode = comExpert;
def->set_default_value(new ConfigOptionEnum<GCodeFlavor>(gcfRepRap));
def->set_default_value(new ConfigOptionEnum<GCodeFlavor>(gcfRepRapSprinter));
def = this->add("gcode_label_objects", coBool);
def->label = L("Label objects");
@ -3290,11 +3292,12 @@ std::string FullPrintConfig::validate()
if (this->use_firmware_retraction.value &&
this->gcode_flavor.value != gcfSmoothie &&
this->gcode_flavor.value != gcfRepRap &&
this->gcode_flavor.value != gcfRepRapSprinter &&
this->gcode_flavor.value != gcfRepRapFirmware &&
this->gcode_flavor.value != gcfMarlin &&
this->gcode_flavor.value != gcfMachinekit &&
this->gcode_flavor.value != gcfRepetier)
return "--use-firmware-retraction is only supported by Marlin, Smoothie, Repetier and Machinekit firmware";
return "--use-firmware-retraction is only supported by Marlin, Smoothie, RepRapFirmware, Repetier and Machinekit firmware";
if (this->use_firmware_retraction.value)
for (unsigned char wipe : this->wipe.values)