|
@@ -122,25 +122,22 @@
|
122
|
122
|
grabpos = parkingposx[tmp_extruder] + hotend_offset[X_AXIS][active_extruder]
|
123
|
123
|
+ (tmp_extruder == 0 ? -(PARKING_EXTRUDER_GRAB_DISTANCE) : PARKING_EXTRUDER_GRAB_DISTANCE);
|
124
|
124
|
/**
|
125
|
|
- * Steps:
|
126
|
|
- * 1. Raise Z-Axis to give enough clearance
|
127
|
|
- * 2. Move to park position of old extruder
|
128
|
|
- * 3. Disengage magnetic field, wait for delay
|
129
|
|
- * 4. Move near new extruder
|
130
|
|
- * 5. Engage magnetic field for new extruder
|
131
|
|
- * 6. Move to parking incl. offset of new extruder
|
132
|
|
- * 7. Lower Z-Axis
|
|
125
|
+ * 1. Raise Z-Axis to give enough clearance
|
|
126
|
+ * 2. Move to park position of old extruder
|
|
127
|
+ * 3. Disengage magnetic field, wait for delay
|
|
128
|
+ * 4. Move near new extruder
|
|
129
|
+ * 5. Engage magnetic field for new extruder
|
|
130
|
+ * 6. Move to parking incl. offset of new extruder
|
|
131
|
+ * 7. Lower Z-Axis
|
133
|
132
|
*/
|
134
|
133
|
|
135
|
134
|
// STEP 1
|
136
|
135
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
137
|
|
- SERIAL_ECHOLNPGM("Starting Autopark");
|
138
|
|
- if (DEBUGGING(LEVELING)) DEBUG_POS("current position:", current_position);
|
|
136
|
+ if (DEBUGGING(LEVELING)) DEBUG_POS("Start Autopark", current_position);
|
139
|
137
|
#endif
|
140
|
138
|
current_position[Z_AXIS] += PARKING_EXTRUDER_SECURITY_RAISE;
|
141
|
139
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
142
|
|
- SERIAL_ECHOLNPGM("(1) Raise Z-Axis ");
|
143
|
|
- if (DEBUGGING(LEVELING)) DEBUG_POS("Moving to Raised Z-Position", current_position);
|
|
140
|
+ if (DEBUGGING(LEVELING)) DEBUG_POS("(1) Raise Z-Axis", current_position);
|
144
|
141
|
#endif
|
145
|
142
|
planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[Z_AXIS], active_extruder);
|
146
|
143
|
planner.synchronize();
|
|
@@ -148,33 +145,35 @@
|
148
|
145
|
// STEP 2
|
149
|
146
|
current_position[X_AXIS] = parkingposx[active_extruder] + hotend_offset[X_AXIS][active_extruder];
|
150
|
147
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
151
|
|
- SERIAL_ECHOLNPAIR("(2) Park extruder ", active_extruder);
|
152
|
|
- if (DEBUGGING(LEVELING)) DEBUG_POS("Moving ParkPos", current_position);
|
|
148
|
+ if (DEBUGGING(LEVELING)) {
|
|
149
|
+ SERIAL_ECHOLNPAIR("(2) Park extruder ", int(active_extruder));
|
|
150
|
+ DEBUG_POS("Moving ParkPos", current_position);
|
|
151
|
+ }
|
153
|
152
|
#endif
|
154
|
153
|
planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[X_AXIS], active_extruder);
|
155
|
154
|
planner.synchronize();
|
156
|
155
|
|
157
|
156
|
// STEP 3
|
158
|
157
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
159
|
|
- SERIAL_ECHOLNPGM("(3) Disengage magnet ");
|
|
158
|
+ if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("(3) Disengage magnet ");
|
160
|
159
|
#endif
|
161
|
160
|
pe_deactivate_magnet(active_extruder);
|
162
|
161
|
|
163
|
162
|
// STEP 4
|
164
|
163
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
165
|
|
- SERIAL_ECHOLNPGM("(4) Move to position near new extruder");
|
|
164
|
+ if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("(4) Move to position near new extruder");
|
166
|
165
|
#endif
|
167
|
166
|
current_position[X_AXIS] += (active_extruder == 0 ? 10 : -10); // move 10mm away from parked extruder
|
168
|
167
|
|
169
|
168
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
170
|
|
- if (DEBUGGING(LEVELING)) DEBUG_POS("Moving away from parked extruder", current_position);
|
|
169
|
+ if (DEBUGGING(LEVELING)) DEBUG_POS("Move away from parked extruder", current_position);
|
171
|
170
|
#endif
|
172
|
171
|
planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[X_AXIS], active_extruder);
|
173
|
172
|
planner.synchronize();
|
174
|
173
|
|
175
|
174
|
// STEP 5
|
176
|
175
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
177
|
|
- SERIAL_ECHOLNPGM("(5) Engage magnetic field");
|
|
176
|
+ if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("(5) Engage magnetic field");
|
178
|
177
|
#endif
|
179
|
178
|
|
180
|
179
|
#if ENABLED(PARKING_EXTRUDER_SOLENOIDS_INVERT)
|
|
@@ -187,8 +186,7 @@
|
187
|
186
|
planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[X_AXIS], active_extruder);
|
188
|
187
|
current_position[X_AXIS] = grabpos;
|
189
|
188
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
190
|
|
- SERIAL_ECHOLNPAIR("(6) Unpark extruder ", tmp_extruder);
|
191
|
|
- if (DEBUGGING(LEVELING)) DEBUG_POS("Move UnparkPos", current_position);
|
|
189
|
+ if (DEBUGGING(LEVELING)) DEBUG_POS("(6) Unpark extruder", current_position);
|
192
|
190
|
#endif
|
193
|
191
|
planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[X_AXIS]/2, active_extruder);
|
194
|
192
|
planner.synchronize();
|
|
@@ -196,8 +194,7 @@
|
196
|
194
|
// Step 7
|
197
|
195
|
current_position[X_AXIS] = midpos - hotend_offset[X_AXIS][tmp_extruder];
|
198
|
196
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
199
|
|
- SERIAL_ECHOLNPGM("(7) Move midway between hotends");
|
200
|
|
- if (DEBUGGING(LEVELING)) DEBUG_POS("Move midway to new extruder", current_position);
|
|
197
|
+ if (DEBUGGING(LEVELING)) DEBUG_POS("(7) Move midway between hotends", current_position);
|
201
|
198
|
#endif
|
202
|
199
|
planner.buffer_line_kinematic(current_position, planner.max_feedrate_mm_s[X_AXIS], active_extruder);
|
203
|
200
|
planner.synchronize();
|