FIX: use extruder list to decide chamber temp

As title.Use the same way to decide exhaust fan.
Removes end print exhaust fan control.

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: Id14f3d91171b81239b336ef879061c6de7d68edf
This commit is contained in:
xun.zhang 2023-08-14 19:59:45 +08:00 committed by Lane.Wei
parent 9b20cad55e
commit 8d2a5dedc1
10 changed files with 44 additions and 112 deletions

View file

@ -2752,10 +2752,6 @@ void TabFilament::build()
line.append_option(optgroup->get_option("during_print_exhaust_fan_speed"));
optgroup->append_line(line);
line = {L("End of print"), L("")};
line.append_option(optgroup->get_option("end_print_exhaust_fan_speed"));
line.append_option(optgroup->get_option("end_print_exhaust_fan_time"));
optgroup->append_line(line);
line = {L("Complete print"), L("")};
line.append_option(optgroup->get_option("complete_print_exhaust_fan_speed"));
@ -2867,12 +2863,11 @@ void TabFilament::toggle_options()
bool has_enable_overhang_bridge_fan = m_config->opt_bool("enable_overhang_bridge_fan", 0);
for (auto el : { "overhang_fan_speed", "overhang_fan_threshold" })
toggle_option(el, has_enable_overhang_bridge_fan);
bool support_air_filtration = this->m_preset_bundle->printers.get_selected_preset().config.opt_bool("support_air_filtration");
//this->m_preset_bundle.
//toggle_line("activate_air_filtration",support_air_filtration);
//m_config;
for (auto elem : { "during_print_exhaust_fan_speed","end_print_exhaust_fan_speed","end_print_exhaust_fan_time","complete_print_exhaust_fan_speed" })
//toggle_line(elem, m_config->opt_bool("activate_air_filtration",0)&&support_air_filtration);
toggle_line("activate_air_filtration",support_air_filtration);
for (auto elem : { "during_print_exhaust_fan_speed","complete_print_exhaust_fan_speed" })
toggle_line(elem, m_config->opt_bool("activate_air_filtration",0));
}
@ -2887,6 +2882,9 @@ void TabFilament::toggle_options()
toggle_option("pressure_advance", m_config->opt_bool("enable_pressure_advance", 0));
}
bool support_chamber_temp_control = this->m_preset_bundle->printers.get_selected_preset().config.opt_bool("support_chamber_temp_control");
toggle_line("chamber_temperatures", support_chamber_temp_control);
for (auto el :
{"cool_plate_temp", "cool_plate_temp_initial_layer", "eng_plate_temp", "eng_plate_temp_initial_layer", "textured_plate_temp", "textured_plate_temp_initial_layer"})
toggle_line(el, is_BBL_printer);
@ -3105,7 +3103,7 @@ void TabPrinter::build_fff()
optgroup = page->new_optgroup(L("Accessory") /*, L"param_accessory"*/);
optgroup->append_single_option_line("nozzle_type");
optgroup->append_single_option_line("auxiliary_fan");
optgroup->append_single_option_line("chamber_temp_control");
optgroup->append_single_option_line("support_chamber_temp_control");
optgroup->append_single_option_line("support_air_filtration");
const int gcode_field_height = 15; // 150
@ -3663,7 +3661,7 @@ void TabPrinter::toggle_options()
toggle_option("gcode_flavor", !is_BBL_printer);
toggle_option("use_relative_e_distances", !is_BBL_printer);
toggle_option("chamber_temp_control",!is_BBL_printer);
toggle_option("support_chamber_temp_control",!is_BBL_printer);
toggle_option("support_air_filtration",!is_BBL_printer);
auto flavor = m_config->option<ConfigOptionEnum<GCodeFlavor>>("gcode_flavor")->value;
bool is_marlin_flavor = flavor == gcfMarlinLegacy || flavor == gcfMarlinFirmware;