support chamber temperature per filament #1160

This commit is contained in:
SoftFever 2023-08-10 22:08:48 +08:00
parent 333a5067ec
commit 3e393df9df
4 changed files with 5 additions and 6 deletions

View file

@ -5,7 +5,6 @@
"instantiation": "false",
"inherits": "fdm_filament_common",
"bed_temperature_difference": ["10"],
"chamber_temperature": "0",
"close_fan_the_first_x_layers": ["1"],
"compatible_printers_condition": "",
"compatible_prints": [],

View file

@ -1829,7 +1829,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
m_placeholder_parser.set("bed_temperature", new ConfigOptionInts(*bed_temp_opt));
m_placeholder_parser.set("bed_temperature_initial_layer_single", new ConfigOptionInt(first_bed_temp_opt->get_at(initial_extruder_id)));
m_placeholder_parser.set("bed_temperature_initial_layer_vector", new ConfigOptionString(""));
m_placeholder_parser.set("chamber_temperature",new ConfigOptionInt(m_config.chamber_temperature));
m_placeholder_parser.set("chamber_temperature",new ConfigOptionInts(m_config.chamber_temperature));
// SoftFever: support variables `first_layer_temperature` and `first_layer_bed_temperature`
m_placeholder_parser.set("first_layer_bed_temperature", new ConfigOptionInts(*first_bed_temp_opt));

View file

@ -3368,14 +3368,14 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("chamber_temperature", coInt);
def = this->add("chamber_temperature", coInts);
def->label = L("Chamber temperature");
def->tooltip = L("Target chamber temperature");
def->sidetext = L("°C");
def->full_label = L("Chamber temperature");
def->min = 0;
def->max = max_temp;
def->set_default_value(new ConfigOptionInt(0));
def->set_default_value(new ConfigOptionInts{0});
def = this->add("nozzle_temperature", coInts);
def->label = L("Other layers");
@ -4550,7 +4550,7 @@ void PrintConfigDef::handle_legacy(t_config_option_key &opt_key, std::string &va
}
} else if (opt_key == "overhang_fan_threshold" && value == "5%") {
value = "10%";
}
}
// Ignore the following obsolete configuration keys:
static std::set<std::string> ignore = {

View file

@ -995,7 +995,7 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE(
((ConfigOptionBool, spiral_mode))
((ConfigOptionInt, standby_temperature_delta))
((ConfigOptionInts, nozzle_temperature))
((ConfigOptionInt , chamber_temperature))
((ConfigOptionInts , chamber_temperature))
((ConfigOptionBools, wipe))
// BBS
((ConfigOptionInts, bed_temperature_difference))