Update M600-support.cfg

This commit is contained in:
Cyril 2024-03-14 12:01:23 +01:00
parent 7817b741bb
commit dce02707a2

View file

@ -21,6 +21,7 @@ runout_gcode:
[gcode_macro M600]
description: Filament Change
variable_m600_state: 0
variable_fan0_speed: 0
gcode:
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
{% set y_park = printer.toolhead.axis_minimum.y|float + 5.0 %}
@ -63,7 +64,7 @@ gcode:
RESPOND TYPE=command MSG="Extruder not hot enough!"
{% endif %}
SET_GCODE_VARIABLE MACRO=PRINTER_PARAM VARIABLE=fan2_speed VALUE={printer['output_pin fan2'].value}
SET_GCODE_VARIABLE MACRO=PRINTER_PARAM VARIABLE=fan0_speed VALUE={printer['output_pin fan0'].value}
SET_GCODE_VARIABLE MACRO=M600 VARIABLE=fan0_speed VALUE={printer['output_pin fan0'].value}
M106 P0 S0
M106 P2 S0
SET_IDLE_TIMEOUT TIMEOUT=900
@ -113,8 +114,8 @@ gcode:
{% else %}
RESPOND TYPE=command MSG="Extruder not hot enough!"
{% endif %}
{% if printer['gcode_macro PRINTER_PARAM'].fan0_speed > 0 %}
{% set s_value = (printer['gcode_macro PRINTER_PARAM'].fan0_speed * 255 - printer['gcode_macro PRINTER_PARAM'].fan0_min) * 255 / (255 - printer['gcode_macro PRINTER_PARAM'].fan0_min)|float %}
{% if printer['gcode_macro M600'].fan0_speed > 0 %}
{% set s_value = (printer['gcode_macro M600'].fan0_speed * 255 - printer['gcode_macro PRINTER_PARAM'].fan0_min) * 255 / (255 - printer['gcode_macro PRINTER_PARAM'].fan0_min)|float %}
M106 P0 S{s_value}
{% endif %}
SET_GCODE_VARIABLE MACRO=M600 VARIABLE=m600_state VALUE=0