Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 34f74a4

Browse files
thinkyheadmh-dm
authored andcommittedMay 15, 2022
🐛 Fix fan index for Singlenozzle, chamber fan
Fixes MarlinFirmware#22512 Followup to MarlinFirmware#19152, MarlinFirmware#19519
1 parent 7bc03af commit 34f74a4

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
@@ -369,7 +369,7 @@ const char str_t_thermal_runaway[] PROGMEM = STR_T_THERMAL_RUNAWAY,
369369
}
370370
#endif
371371

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

374374
if (fan >= FAN_COUNT) return;
375375

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

14871487
#if ENABLED(CHAMBER_VENT)
@@ -1512,7 +1512,7 @@ void Temperature::manage_heater() {
15121512
else if (!flag_chamber_off) {
15131513
#if ENABLED(CHAMBER_FAN)
15141514
flag_chamber_off = true;
1515-
set_fan_speed(2, 0);
1515+
set_fan_speed(CHAMBER_FAN_INDEX, 0);
15161516
#endif
15171517
#if ENABLED(CHAMBER_VENT)
15181518
flag_chamber_excess_heat = false;

0 commit comments

Comments
 (0)
Please sign in to comment.