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 Night69 committed Aug 31, 2021
1 parent 5cebf95 commit de23177
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 @@ -350,7 +350,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 @@ -1462,7 +1462,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 @@ -1493,7 +1493,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 de23177

Please sign in to comment.