Skip to content

Commit

Permalink
🐛 Fix fan index for Singlenozzle, chamber fan
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead authored and mh-dm committed May 15, 2022
1 parent 7bc03af commit 34f74a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Marlin/src/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -2002,7 +2002,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#endif

#if REDUNDANT_TEMP_MATCH(SOURCE, E0) && HAS_HOTEND
#error "TEMP_SENSOR_REDUNDANT_SOURCE can't be 0 if a hotend is used. E0 always uses TEMP_SENSOR_0."
#error "TEMP_SENSOR_REDUNDANT_SOURCE can't be E0 if a hotend is used. E0 always uses TEMP_SENSOR_0."
#elif REDUNDANT_TEMP_MATCH(SOURCE, COOLER) && HAS_TEMP_COOLER
#error "TEMP_SENSOR_REDUNDANT_SOURCE can't be COOLER. TEMP_SENSOR_COOLER is in use."
#elif REDUNDANT_TEMP_MATCH(SOURCE, PROBE) && HAS_TEMP_PROBE
Expand Down
6 changes: 3 additions & 3 deletions Marlin/src/module/temperature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ const char str_t_thermal_runaway[] PROGMEM = STR_T_THERMAL_RUNAWAY,
}
#endif

TERN_(SINGLENOZZLE, fan = 0); // Always use fan index 0 with SINGLENOZZLE
TERN_(SINGLENOZZLE, if (fan < EXTRUDERS) fan = 0); // Always fan 0 for SINGLENOZZLE E fan

if (fan >= FAN_COUNT) return;

Expand Down Expand Up @@ -1481,7 +1481,7 @@ void Temperature::manage_heater() {
fan_chamber_pwm = CHAMBER_FAN_BASE + _MAX((CHAMBER_FAN_FACTOR) * (temp_chamber.celsius - temp_chamber.target), 0);
#endif
NOMORE(fan_chamber_pwm, 225);
set_fan_speed(2, fan_chamber_pwm); // TODO: instead of fan 2, set to chamber fan
set_fan_speed(CHAMBER_FAN_INDEX, fan_chamber_pwm); // TODO: instead of fan 2, set to chamber fan
#endif

#if ENABLED(CHAMBER_VENT)
Expand Down Expand Up @@ -1512,7 +1512,7 @@ void Temperature::manage_heater() {
else if (!flag_chamber_off) {
#if ENABLED(CHAMBER_FAN)
flag_chamber_off = true;
set_fan_speed(2, 0);
set_fan_speed(CHAMBER_FAN_INDEX, 0);
#endif
#if ENABLED(CHAMBER_VENT)
flag_chamber_excess_heat = false;
Expand Down

0 comments on commit 34f74a4

Please sign in to comment.