Frix-x / klippain

Generic Klipper configuration for 3D printers
GNU General Public License v3.0
832 stars 219 forks source link

END_PRINT macro static filter fan #590

Open bananensoftware opened 2 months ago

bananensoftware commented 2 months ago

Klippain branch

Version

v4.3.1-11-g4ff6f5b4

Describe the bug and expected behavior

The filter macro sets the filter_name for using the correct fan dynamically:

[gcode_macro START_FILTER]
gcode:
    {% set SPEED = params.SPEED|default(1)|float %}

    {% set filter_name = printer["gcode_macro _USER_VARIABLES"].filter_name %}
    SET_FAN_SPEED FAN={filter_name} SPEED={SPEED}

But not in the END_PRINT macro, which breaks if a diffrent name then filter is used:

    {% if filter_enabled %}
        {% if printer['fan_generic filter'].speed > 0 %}
            {% set FILTER_TIME = params.FILTER_TIME|default(filter_default_time)|int %}
            START_FILTER SPEED=1
            UPDATE_DELAYED_GCODE ID=_STOP_FILTER_DELAYED DURATION={FILTER_TIME}
        {% endif %}
    {% endif %}

Additional information and klippy.log

No response

Surion79 commented 2 months ago

you mean the if-line?

bananensoftware commented 2 months ago

yes, the current implementation makes it pointless to have configurable filter name.

github-actions[bot] commented 1 month ago

📌 This issue has been marked as stale because it has not had activity in the past 30 days. To keep it open, please respond to this message or add new information. Otherwise, this will be closed in 14 days. Thank you for your contributions!

rajenki commented 1 month ago

Same issue as mentioned in #610

github-actions[bot] commented 2 days ago

📌 This issue has been marked as stale because it has not had activity in the past 30 days. To keep it open, please respond to this message or add new information. Otherwise, this will be closed in 14 days. Thank you for your contributions!