Added an option to enable multiple bed type support for printers

This commit is contained in:
SoftFever 2024-01-04 23:12:36 +08:00
parent c4538ae0a4
commit c02d2c4db3
6 changed files with 36 additions and 33 deletions

View file

@ -878,7 +878,7 @@ static std::vector<std::string> s_Preset_printer_options {
"cooling_tube_retraction",
"cooling_tube_length", "high_current_on_filament_swap", "parking_pos_retraction", "extra_loading_move", "purge_in_prime_tower", "enable_filament_ramming",
"z_offset",
"disable_m73", "preferred_orientation", "emit_machine_limits_to_gcode"
"disable_m73", "preferred_orientation", "emit_machine_limits_to_gcode", "support_multi_bed_types"
};
static std::vector<std::string> s_Preset_sla_print_options {

View file

@ -294,6 +294,7 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n
|| opt_key == "enable_filament_ramming"
|| opt_key == "purge_in_prime_tower"
|| opt_key == "z_offset"
|| opt_key == "support_multi_bed_types"
) {
steps.emplace_back(psWipeTower);
steps.emplace_back(psSkirtBrim);

View file

@ -2355,6 +2355,12 @@ def = this->add("filament_loading_speed", coFloats);
def->readonly = false;
def->set_default_value(new ConfigOptionEnum<GCodeFlavor>(gcfMarlinLegacy));
def = this->add("support_multi_bed_types", coBool);
def->label = L("Support multi bed types");
def->tooltip = L("Enable this option if you want to use multiple bed types");
def->mode = comSimple;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("gcode_label_objects", coBool);
def->label = L("Label objects");
def->tooltip = L("Enable this to add comments into the G-Code labeling print moves with what object they belong to,"

View file

@ -1051,6 +1051,7 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionFloats, filament_multitool_ramming_flow))
((ConfigOptionBool, purge_in_prime_tower))
((ConfigOptionBool, enable_filament_ramming))
((ConfigOptionBool, support_multi_bed_types))
)