🐛 Fix fan index for Singlenozzle, chamber fan

Fixes #22512
Followup to #19152, #19519
This commit is contained in:
Scott Lahteine 2021-08-05 23:24:20 -05:00 committed by Scott Lahteine
parent a668a9d302
commit fefde2a644
2 changed files with 7 additions and 7 deletions

View File

@ -2047,10 +2047,10 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#error "TEMP_SENSOR_REDUNDANT_TARGET can't be Cooler (-5): requires TEMP_COOLER_PIN"
#endif
#if TEMP_SENSOR_REDUNDANT_IS_MAX_TC && TEMP_SENSOR_REDUNDANT_SOURCE == 0 && !PIN_EXISTS(TEMP_0_CS)
#error "TEMP_SENSOR_REDUNDANT MAX Thermocouple with TEMP_SENSOR_REDUNDANT_SOURCE 0 requires TEMP_0_CS_PIN."
#elif TEMP_SENSOR_REDUNDANT_IS_MAX_TC && TEMP_SENSOR_REDUNDANT_SOURCE == 1 && !PIN_EXISTS(TEMP_1_CS)
#error "TEMP_SENSOR_REDUNDANT MAX Thermocouple with TEMP_SENSOR_REDUNDANT_SOURCE 1 requires TEMP_1_CS_PIN."
#if TEMP_SENSOR_REDUNDANT_IS_MAX_TC && REDUNDANT_TEMP_MATCH(SOURCE, E0) && !PIN_EXISTS(TEMP_0_CS)
#error "TEMP_SENSOR_REDUNDANT MAX Thermocouple with TEMP_SENSOR_REDUNDANT_SOURCE E0 requires TEMP_0_CS_PIN."
#elif TEMP_SENSOR_REDUNDANT_IS_MAX_TC && REDUNDANT_TEMP_MATCH(SOURCE, E1) && !PIN_EXISTS(TEMP_1_CS)
#error "TEMP_SENSOR_REDUNDANT MAX Thermocouple with TEMP_SENSOR_REDUNDANT_SOURCE E1 requires TEMP_1_CS_PIN."
#endif
#endif

View File

@ -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;
@ -1461,7 +1461,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)
@ -1492,7 +1492,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;