|
@@ -47,11 +47,12 @@
|
47
|
47
|
bool toolchange_extruder_ready[EXTRUDERS];
|
48
|
48
|
#endif
|
49
|
49
|
|
50
|
|
-#if ENABLED(SINGLENOZZLE)
|
|
50
|
+#if ENABLED(SINGLENOZZLE_STANDBY_TEMP)
|
51
|
51
|
uint16_t singlenozzle_temp[EXTRUDERS];
|
52
|
|
- #if HAS_FAN
|
53
|
|
- uint8_t singlenozzle_fan_speed[EXTRUDERS];
|
54
|
|
- #endif
|
|
52
|
+#endif
|
|
53
|
+
|
|
54
|
+#if BOTH(HAS_FAN, SINGLENOZZLE_STANDBY_FAN)
|
|
55
|
+ uint8_t singlenozzle_fan_speed[EXTRUDERS];
|
55
|
56
|
#endif
|
56
|
57
|
|
57
|
58
|
#if ENABLED(MAGNETIC_PARKING_EXTRUDER) || defined(EVENT_GCODE_AFTER_TOOLCHANGE) || (ENABLED(PARKING_EXTRUDER) && PARKING_EXTRUDER_SOLENOIDS_DELAY > 0)
|
|
@@ -822,7 +823,7 @@ void tool_change_prime() {
|
822
|
823
|
#if TOOLCHANGE_FS_FAN >= 0 && HAS_FAN
|
823
|
824
|
const int16_t fansp = thermalManager.fan_speed[TOOLCHANGE_FS_FAN];
|
824
|
825
|
thermalManager.fan_speed[TOOLCHANGE_FS_FAN] = toolchange_settings.fan_speed;
|
825
|
|
- safe_delay(toolchange_settings.fan_time * 1000);
|
|
826
|
+ gcode.dwell(toolchange_settings.fan_time * 1000);
|
826
|
827
|
thermalManager.fan_speed[TOOLCHANGE_FS_FAN] = fansp;
|
827
|
828
|
#endif
|
828
|
829
|
|
|
@@ -934,7 +935,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
|
934
|
935
|
|
935
|
936
|
// Z raise before retraction
|
936
|
937
|
#if ENABLED(TOOLCHANGE_ZRAISE_BEFORE_RETRACT) && DISABLED(SWITCHING_NOZZLE)
|
937
|
|
- if (can_move_away && TERN1(toolchange_settings.enable_park)) {
|
|
938
|
+ if (can_move_away && TERN1(TOOLCHANGE_PARK, toolchange_settings.enable_park)) {
|
938
|
939
|
// Do a small lift to avoid the workpiece in the move back (below)
|
939
|
940
|
current_position.z += toolchange_settings.z_raise;
|
940
|
941
|
#if HAS_SOFTWARE_ENDSTOPS
|
|
@@ -956,8 +957,12 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
|
956
|
957
|
SERIAL_ECHO_MSG(STR_ERR_HOTEND_TOO_COLD);
|
957
|
958
|
if (ENABLED(SINGLENOZZLE)) { active_extruder = new_tool; return; }
|
958
|
959
|
}
|
959
|
|
- else
|
960
|
|
- unscaled_e_move(-toolchange_settings.swap_length, MMM_TO_MMS(toolchange_settings.retract_speed));
|
|
960
|
+ else {
|
|
961
|
+ // If first new tool, toolchange without unloading the old not initialized 'Just prime/init the new'
|
|
962
|
+ if (first_tool_is_primed)
|
|
963
|
+ unscaled_e_move(-toolchange_settings.swap_length, MMM_TO_MMS(toolchange_settings.retract_speed));
|
|
964
|
+ first_tool_is_primed = true; // The first new tool will be primed by toolchanging
|
|
965
|
+ }
|
961
|
966
|
}
|
962
|
967
|
#endif
|
963
|
968
|
|
|
@@ -1059,15 +1064,16 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
|
1059
|
1064
|
const bool should_move = safe_to_move && !no_move && IsRunning();
|
1060
|
1065
|
if (should_move) {
|
1061
|
1066
|
|
1062
|
|
- #if ENABLED(SINGLENOZZLE)
|
1063
|
|
- #if HAS_FAN
|
1064
|
|
- singlenozzle_fan_speed[old_tool] = thermalManager.fan_speed[0];
|
1065
|
|
- thermalManager.fan_speed[0] = singlenozzle_fan_speed[new_tool];
|
1066
|
|
- #endif
|
|
1067
|
+ #if BOTH(HAS_FAN, SINGLENOZZLE_STANDBY_FAN)
|
|
1068
|
+ singlenozzle_fan_speed[old_tool] = thermalManager.fan_speed[0];
|
|
1069
|
+ thermalManager.fan_speed[0] = singlenozzle_fan_speed[new_tool];
|
|
1070
|
+ #endif
|
1067
|
1071
|
|
|
1072
|
+ #if ENABLED(SINGLENOZZLE_STANDBY_TEMP)
|
1068
|
1073
|
singlenozzle_temp[old_tool] = thermalManager.temp_hotend[0].target;
|
1069
|
1074
|
if (singlenozzle_temp[new_tool] && singlenozzle_temp[new_tool] != singlenozzle_temp[old_tool]) {
|
1070
|
1075
|
thermalManager.setTargetHotend(singlenozzle_temp[new_tool], 0);
|
|
1076
|
+ TERN_(AUTOTEMP, planner.autotemp_update());
|
1071
|
1077
|
TERN_(HAS_DISPLAY, thermalManager.set_heating_message(0));
|
1072
|
1078
|
(void)thermalManager.wait_for_hotend(0, false); // Wait for heating or cooling
|
1073
|
1079
|
}
|
|
@@ -1101,7 +1107,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
|
1101
|
1107
|
#if TOOLCHANGE_FS_FAN >= 0 && HAS_FAN
|
1102
|
1108
|
const int16_t fansp = thermalManager.fan_speed[TOOLCHANGE_FS_FAN];
|
1103
|
1109
|
thermalManager.fan_speed[TOOLCHANGE_FS_FAN] = toolchange_settings.fan_speed;
|
1104
|
|
- safe_delay(toolchange_settings.fan_time * 1000);
|
|
1110
|
+ gcode.dwell(toolchange_settings.fan_time * 1000);
|
1105
|
1111
|
thermalManager.fan_speed[TOOLCHANGE_FS_FAN] = fansp;
|
1106
|
1112
|
#endif
|
1107
|
1113
|
}
|
|
@@ -1245,10 +1251,9 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
|
1245
|
1251
|
|
1246
|
1252
|
// Migrate the temperature to the new hotend
|
1247
|
1253
|
#if HAS_MULTI_HOTEND
|
1248
|
|
- thermalManager.setTargetHotend(thermalManager.degTargetHotend(active_extruder), migration_extruder);
|
1249
|
|
- #if HAS_DISPLAY
|
1250
|
|
- thermalManager.set_heating_message(0);
|
1251
|
|
- #endif
|
|
1254
|
+ thermalManager.setTargetHotend(thermalManager.temp_hotend[active_extruder].target, migration_extruder);
|
|
1255
|
+ TERN_(AUTOTEMP, planner.autotemp_update());
|
|
1256
|
+ TERN_(HAS_DISPLAY, thermalManager.set_heating_message(0));
|
1252
|
1257
|
thermalManager.wait_for_hotend(active_extruder);
|
1253
|
1258
|
#endif
|
1254
|
1259
|
|