Skip to content

Commit

Permalink
fix(macros): 🐛 Fix variable cast type in TARGET_FAN macro
Browse files Browse the repository at this point in the history
Correct a typo where the FAN_NAME variable is cast to a float when it should be a string.
  • Loading branch information
rootiest committed Oct 11, 2023
1 parent fa4c8d1 commit 5846da4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions macros/TARGET_FAN.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ gcode:
{% set HEATER_TARGET = params.HEATER_TARGET|default(60)|float %}
{% set FAN_TARGET = params.FAN_TARGET|default(100)|float %}
{% set FAN_SPEED = params.FAN_SPEED|default(1)|float %}
{% set FAN_NAME = params.FAN_NAME|default('bed_fan')|float %}
{% set FAN_NAME = params.FAN_NAME|default('bed_fan')|string %}

{% if HEATER_TARGET >= FAN_TARGET %}
SET_FAN_SPEED FAN={FAN_NAME} SPEED={FAN_SPEED} # Turn on bed_fan if target is above or equal.
Expand All @@ -30,4 +30,4 @@ gcode:
# This allows us to use multiple fan speeds and even multiple fans with this macro.
#
# I also changed BED_TARGET to HEATER_TARGET to make this more generic for
# use with any heater/fan combination. Sorry, last breaking change to this macro, I promise!
# use with any heater/fan combination. Sorry, last breaking change to this macro, I promise!

0 comments on commit 5846da4

Please sign in to comment.