update idle< skew
This commit is contained in:
57
Scripts/aux_fan.cfg.var
Normal file
57
Scripts/aux_fan.cfg.var
Normal file
@@ -0,0 +1,57 @@
|
||||
[gcode_macro M106]
|
||||
rename_existing: G106
|
||||
gcode:
|
||||
{% if params.P is defined %}
|
||||
{% if params.P|int == 2 %}
|
||||
{% if params.S is defined %}
|
||||
{% if params.S|int == 255 %}
|
||||
{% set realspeed = 1 %}
|
||||
{% else %}
|
||||
{% if params.S|int == 0 %}
|
||||
{% set realspeed = 0 %}
|
||||
{% else %}
|
||||
{% set realspeed = params.S|float/255 %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% set realspeed = 1 %}
|
||||
{% endif %}
|
||||
|
||||
SET_FAN_SPEED FAN=Aux_Fan SPEED={realspeed}
|
||||
{% endif %}
|
||||
{% if params.P|int == 1 %}
|
||||
{% if params.S is defined %}
|
||||
{% if params.S|int == 255 %}
|
||||
{% set realspeed = 1 %}
|
||||
{% else %}
|
||||
{% if params.S|int == 0 %}
|
||||
{% set realspeed = 0 %}
|
||||
{% else %}
|
||||
{% set realspeed = params.S|float/255 %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% set realspeed = 1 %}
|
||||
{% endif %}
|
||||
|
||||
SET_FAN_SPEED FAN=Exhaust_fan SPEED={realspeed}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if params.S is defined %}
|
||||
G106 S{params.S}
|
||||
{% else %}
|
||||
G106 S255
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
[gcode_macro M107]
|
||||
rename_existing: G107
|
||||
gcode:
|
||||
{% if params.P is defined %}
|
||||
{% if params.P|int == 2 %}
|
||||
SET_FAN_SPEED FAN=Aux_Fan SPEED=0
|
||||
{% endif %}
|
||||
{% else %}
|
||||
SET_FAN_SPEED FAN=Aux_Fan SPEED=0
|
||||
G107
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user