Add wipe_tower_type printer setting to replace vendor-based wipe tower selection

Previously, wipe tower behavior was determined by checking if the printer
  was a QIDI vendor. This introduces a configurable enum (Type 1 / Type 2)
  so any printer can select its wipe tower implementation. BBL printers
  remain hardcoded to Type 1. Qidi profiles default to Type 1.
This commit is contained in:
SoftFever
2026-03-15 22:19:53 +08:00
parent 494601eea5
commit d58d9be07b
18 changed files with 63 additions and 39 deletions

View File

@@ -187,6 +187,12 @@ static t_config_enum_values s_keys_map_NoiseType {
};
CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(NoiseType)
static t_config_enum_values s_keys_map_WipeTowerType {
{ "type1", int(WipeTowerType::Type1) },
{ "type2", int(WipeTowerType::Type2) }
};
CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(WipeTowerType)
static t_config_enum_values s_keys_map_FuzzySkinMode {
{ "displacement", int(FuzzySkinMode::Displacement) },
{ "extrusion", int(FuzzySkinMode::Extrusion) },
@@ -5484,6 +5490,17 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("wipe_tower_type", coEnum);
def->label = L("Wipe tower type");
def->tooltip = L("Choose the wipe tower implementation for multi-material prints. Type 1 is recommended for Bambu and Qidi printers with a filament cutter. Type 2 offers better compatibility with multi-tool and MMU printers and provide overall better compatibility.");
def->enum_keys_map = &ConfigOptionEnum<WipeTowerType>::get_enum_values();
def->enum_values.emplace_back("type1");
def->enum_values.emplace_back("type2");
def->enum_labels.emplace_back(L("Type 1"));
def->enum_labels.emplace_back(L("Type 2"));
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionEnum<WipeTowerType>(WipeTowerType::Type2));
def = this->add("purge_in_prime_tower", coBool);
def->label = L("Purge in prime tower");
def->tooltip = L("Purge remaining filament into prime tower.");