Closed Jyrka98 closed 6 months ago
I don't have a VzBot, but yes, I tested it myself since it is not specific to it. (If you're wondering why I made this pull request, it's because I watched your video and saw an opportunity for improvement)
Thanks for your help. I tested and it was not working. Not sure why. But someone else also messaged me with another option and after making changes to it.. it worked fine and has less line of codes. Here it is:
[gcode_macro M106] rename_existing: G106 gcode: {% set P = params.P | default(0) | int %} {% set S = params.S | default(255) | int %} {% if P == 0 %} G106 S{S} {% else %} {% set fan = "RSCS" if P == 2 else "Exhaust_fan" %} SET_FAN_SPEED FAN={fan} SPEED={S / 255} {% endif %}
[gcode_macro M107]
rename_existing: G107
gcode:
{% set fan = params.P|default(1)|int %}
{% if fan == 2 %}
SET_FAN_SPEED FAN=RSCS SPEED=0
{% elif fan == 3 %}
SET_FAN_SPEED FAN=Exhaust_fan SPEED=0
{% else %}
SET_FAN_SPEED FAN=RSCS SPEED=0
SET_FAN_SPEED FAN=Exhaust_fan SPEED=0
G107
{% endif %}
Hi friend. Thanks for the suggestion. Did you test it yourself ? I just did and doesnt seem to work. It only starts the part cooling fan (cpap) only no matter what P param is there