You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The cancel print macro does a status call against a fixed fan object 'fan_generic filter'.
cancel_print.cfg
CANCEL_PRINT
# If a filter is connected, and used during the print, continue filtering the air
# for a couple of min before stopping everything
{% 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 %}
However it is possible to have a custom filter fan and not use 'filter' by leveraging the _USER_VARIABLES variable_filter_name. As is supported in the filter macros.
But if you use a custom filter name and try to cancel a print job you get an error and cannot cancel/stop the print without e-stop or power cycling (pause still works and I used that first before power cycling)
Error thrown
Error evaluating 'gcode_macro CANCEL_PRINT:gcode': jinja2.exceptions.UndefinedError: 'extras.gcode_macro.GetStatusWrapper object' has no attribute 'fan_generic filter'
Additional information and klippy.log
No response
The text was updated successfully, but these errors were encountered:
I don't have the log handy. I can read the macro code and see the issue, which is why I didn't bother with the log, just the code review and captured error, which pointed to the code section in question. If the issue is truly not obvious please let me know and I will try to elaborate further. I will also see if the klippy log is still available when I get home, which it might not be as that happened yesterday and I had been cleaning up files lately.
Klippain branch
Version
v4.3.1-16-g44f21b25
Describe the bug and expected behavior
The cancel print macro does a status call against a fixed fan object 'fan_generic filter'.
cancel_print.cfg
CANCEL_PRINT
# If a filter is connected, and used during the print, continue filtering the air
# for a couple of min before stopping everything
{% 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 %}
However it is possible to have a custom filter fan and not use 'filter' by leveraging the _USER_VARIABLES variable_filter_name. As is supported in the filter macros.
filter.cfg
START_FILTER / STOP_FILTER
{% set filter_name = printer["gcode_macro _USER_VARIABLES"].filter_name %}
SET_FAN_SPEED FAN={filter_name} SPEED=0
But if you use a custom filter name and try to cancel a print job you get an error and cannot cancel/stop the print without e-stop or power cycling (pause still works and I used that first before power cycling)
Error thrown
Error evaluating 'gcode_macro CANCEL_PRINT:gcode': jinja2.exceptions.UndefinedError: 'extras.gcode_macro.GetStatusWrapper object' has no attribute 'fan_generic filter'
Additional information and klippy.log
No response
The text was updated successfully, but these errors were encountered: