Skip to content

Commit

Permalink
fans: Silently fix out-of-range values
Browse files Browse the repository at this point in the history
  • Loading branch information
jschuh committed Jun 18, 2023
1 parent cf2c3f1 commit d7b3337
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions fans.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,6 @@ description: Wraps M106 to implement scaling overrides.
rename_existing: M106.6245197
gcode:
{% set S = params.S|default(255)|int %}
{% if S > 255 or S < 0 %}
{ action_raise_error("S[%i] out of range.") | format(S) }
{% endif %}

{% set scale = printer["gcode_macro set_fan_scaling"] %}
SET_GCODE_VARIABLE MACRO=set_fan_scaling VARIABLE=real_speed VALUE="{S}"
M106.6245197 S{((((S + scale.boost) * scale.scale) | round | int,
Expand Down

0 comments on commit d7b3337

Please sign in to comment.