feat(printer): add cooling filter support flag and expose its toggle

cooling_filter_enabled existed as a config option but was shown nowhere,
and there was no capability flag to gate it. The cooling filter and air
filtration are alternative accessories sharing the same duct, so a
printer declares one or the other.

- new hidden printer capability flag support_cooling_filter
- "Use cooling filter" toggle in the Accessory group, shown only when
  the printer supports it; the air-filtration toggle hides in that case
  (no vendor restriction: third-party printers keep air filtration)
- explicit defaults (0) in the common machine base
- H2C declares support_cooling_filter=1 instead of support_air_filtration;
  its start-gcode already carries the cooling-filter conditional, so the
  toggle is functional. On H2C this drops the two exhaust-fan lines that
  air filtration emitted for ABS-class filaments, matching the printer's
  actual duct accessory; H2C is new on this branch so no existing user
  output changes.

Printers without the flag keep exactly the previous accessory UI and
g-code.
This commit is contained in:
SoftFever
2026-07-10 16:38:46 +08:00
parent b12aad6a8c
commit 826e36fb1e
6 changed files with 15 additions and 2 deletions

View File

@@ -4959,6 +4959,7 @@ void TabPrinter::build_fff()
optgroup->append_single_option_line("fan_direction");
optgroup->append_single_option_line("support_chamber_temp_control", "printer_basic_information_accessory#support-controlling-chamber-temperature");
optgroup->append_single_option_line("support_air_filtration", "printer_basic_information_accessory#support-air-filtration");
optgroup->append_single_option_line("cooling_filter_enabled");
auto edit_custom_gcode_fn = [this](const t_config_option_key& opt_key) { edit_custom_gcode(opt_key); };
@@ -5895,6 +5896,10 @@ void TabPrinter::toggle_options()
toggle_line("parallel_printheads_count", support_parallel_printheads);
toggle_line("fan_direction", m_config->opt_bool("auxiliary_fan"));
// The cooling filter and air filtration are alternative accessories: show only the one the printer supports.
toggle_line("support_air_filtration", !m_config->opt_bool("support_cooling_filter"));
toggle_line("cooling_filter_enabled", m_config->opt_bool("support_cooling_filter"));
}