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
[gcode_macro M106]
rename_existing: M106.1
gcode:
{% set S = params.S|default(0)|int %}
{% set P = params.P|default(0)|int %}
{% set MULTIPLIER = printer['output_pin fan_multiplier'].value %}
{% set ADJUSTED_S = (S * MULTIPLIER)|round(0)|int %}
M106.1 P{P} S{ADJUSTED_S}
If you want to get fancy you could add a moonraker hook to listen to changes to the factor pins and immediately recalculate fan speed and accel but I only use these when my sliced file is changing them rapidly so they get recalculated when those change pretty quickly anyway.
This was tested on an FLSun T1 Pro running klipper 10. You may need slight changes on different versions of klipper or other printers but hopefully the idea is still helpful.
If you want to get fancy you could add a moonraker hook to listen to changes to the factor pins and immediately recalculate fan speed and accel but I only use these when my sliced file is changing them rapidly so they get recalculated when those change pretty quickly anyway.