Move singlenozzle temp/fan (#20829)

This commit is contained in:
Scott Lahteine
2021-01-19 20:58:50 -06:00
committed by GitHub
parent a275e4e5b8
commit 3f90ecfd77
9 changed files with 43 additions and 39 deletions

View File

@@ -377,6 +377,13 @@ volatile bool Temperature::raw_temps_ready = false;
Temperature::soft_pwm_count_fan[FAN_COUNT];
#endif
#if ENABLED(SINGLENOZZLE_STANDBY_TEMP)
uint16_t Temperature::singlenozzle_temp[EXTRUDERS];
#if HAS_FAN
uint8_t Temperature::singlenozzle_fan_speed[EXTRUDERS];
#endif
#endif
#if ENABLED(PROBING_HEATERS_OFF)
bool Temperature::paused;
#endif
@@ -2195,6 +2202,24 @@ void Temperature::disable_all_heaters() {
#endif // PROBING_HEATERS_OFF
#if ENABLED(SINGLENOZZLE_STANDBY_TEMP)
void Temperature::singlenozzle_change(const uint8_t old_tool, const uint8_t new_tool) {
#if HAS_FAN
singlenozzle_fan_speed[old_tool] = fan_speed[0];
fan_speed[0] = singlenozzle_fan_speed[new_tool];
#endif
singlenozzle_temp[old_tool] = temp_hotend[0].target;
if (singlenozzle_temp[new_tool] && singlenozzle_temp[new_tool] != singlenozzle_temp[old_tool]) {
setTargetHotend(singlenozzle_temp[new_tool], 0);
TERN_(AUTOTEMP, planner.autotemp_update());
TERN_(HAS_DISPLAY, set_heating_message(0));
(void)wait_for_hotend(0, false); // Wait for heating or cooling
}
}
#endif
#if HAS_MAX6675
#ifndef THERMOCOUPLE_MAX_ERRORS