rootiest / zippy-klipper_config

Zippy Klipper Config

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[QUESTION] Error when COLOR_CHANGE Macro is triggered

lilFonsi15 opened this issue · comments

Hi Rootiest,

Thank you for the awesome Macro and write up.

Quick question for you, when the COLOR_CHANGE macro is triggered on my setup I get the following error twice in my console.

Error on 'SET_IDLE_TIMEOUT TIMEOUT=': unable to parse

Have you seen this before?

Thank you for the help and time.

Welcome lilFonsi15!\nCongrats on creating your first issue.\nPlease follow the issue template to help us resolve your issue quickly.

lilFonsi15,

I ran into the same error as you. I resolved the problem by commenting out the SET_IDLE_TIMEOUT. From what I understand the TIMEOUT is for when audio alerts are being used, so if you do need the TIMEOUT you could also set the duration instead of having it pulled from M600.

[gcode_macro COLOR_CHANGE] description: Procedure when Color Change is triggered gcode: {% set m600cfg = printer["gcode_macro _m600cfg"] %} ; get m600cfg variables M{m600cfg.output|int} Filament Runout {% if m600cfg.use_telegram == True %} TELEGRAM_FILAMENT_RUNOUT {% endif %} #SET_IDLE_TIMEOUT TIMEOUT={m600cfg.m600_idle_time} ; results in parsing error {% if m600cfg.audio_status == True %} ; if using audio status alerts {m600cfg.audio_macro} ALERT_BEEP_ON {% endif %} M600 SET_GCODE_VARIABLE MACRO=_m600cfg VARIABLE=prev_temp VALUE={printer.extruder.target} SET_GCODE_VARIABLE MACRO=_m600cfg VARIABLE=runout VALUE=True M{m600cfg.output|int} Unloading Filament... UNLOAD_FILAMENT

Hope this helps!

Hey folks,

Sorry for the really delayed response!
I took a look at this issue and I think I have a solution.

The macro tries to reference a variable called m600_idle_time which is missing.
That causes it to try to set the new idle timeout to an undefined value, which caused the error you experienced.

I have pushed an update that should correct this issue, and the idle timeout adjustments should work as expected now.

Relevant commit:

[Fix for missing m600_idle_time variable in smart-m600](26ab35a)