Skip to content

Commit de23177

Browse files
thinkyheadNight69
authored andcommitted
🐛 Fix fan index for Singlenozzle, chamber fan
Fixes MarlinFirmware#22512 Followup to MarlinFirmware#19152, MarlinFirmware#19519
1 parent 5cebf95 commit de23177

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Marlin/src/inc/SanityCheck.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2002,7 +2002,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
20022002
#endif
20032003

20042004
#if REDUNDANT_TEMP_MATCH(SOURCE, E0) && HAS_HOTEND
2005-
#error "TEMP_SENSOR_REDUNDANT_SOURCE can't be 0 if a hotend is used. E0 always uses TEMP_SENSOR_0."
2005+
#error "TEMP_SENSOR_REDUNDANT_SOURCE can't be E0 if a hotend is used. E0 always uses TEMP_SENSOR_0."
20062006
#elif REDUNDANT_TEMP_MATCH(SOURCE, COOLER) && HAS_TEMP_COOLER
20072007
#error "TEMP_SENSOR_REDUNDANT_SOURCE can't be COOLER. TEMP_SENSOR_COOLER is in use."
20082008
#elif REDUNDANT_TEMP_MATCH(SOURCE, PROBE) && HAS_TEMP_PROBE

Marlin/src/module/temperature.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ const char str_t_thermal_runaway[] PROGMEM = STR_T_THERMAL_RUNAWAY,
350350
}
351351
#endif
352352

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

355355
if (fan >= FAN_COUNT) return;
356356

@@ -1462,7 +1462,7 @@ void Temperature::manage_heater() {
14621462
fan_chamber_pwm = CHAMBER_FAN_BASE + _MAX((CHAMBER_FAN_FACTOR) * (temp_chamber.celsius - temp_chamber.target), 0);
14631463
#endif
14641464
NOMORE(fan_chamber_pwm, 225);
1465-
set_fan_speed(2, fan_chamber_pwm); // TODO: instead of fan 2, set to chamber fan
1465+
set_fan_speed(CHAMBER_FAN_INDEX, fan_chamber_pwm); // TODO: instead of fan 2, set to chamber fan
14661466
#endif
14671467

14681468
#if ENABLED(CHAMBER_VENT)
@@ -1493,7 +1493,7 @@ void Temperature::manage_heater() {
14931493
else if (!flag_chamber_off) {
14941494
#if ENABLED(CHAMBER_FAN)
14951495
flag_chamber_off = true;
1496-
set_fan_speed(2, 0);
1496+
set_fan_speed(CHAMBER_FAN_INDEX, 0);
14971497
#endif
14981498
#if ENABLED(CHAMBER_VENT)
14991499
flag_chamber_excess_heat = false;

0 commit comments

Comments
 (0)