Fix hotend offset on switching toolhead change

See commentary at #11623
This commit is contained in:
Scott Lahteine 2019-03-13 04:09:05 -05:00
parent 8e0ac93d60
commit a5ea3e2f15

View file

@ -429,7 +429,6 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
* 3. Unlock tool and drop it in the dock * 3. Unlock tool and drop it in the dock
* 4. Move to the new toolhead * 4. Move to the new toolhead
* 5. Grab and lock the new toolhead * 5. Grab and lock the new toolhead
* 6. Apply the z-offset of the new toolhead
*/ */
// 1. Raise Z to give enough clearance // 1. Raise Z to give enough clearance
@ -548,16 +547,6 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
fast_line_to_current(Y_AXIS); // move away from docked toolhead fast_line_to_current(Y_AXIS); // move away from docked toolhead
planner.synchronize(); planner.synchronize();
// 6. Apply the z-offset of the new toolhead
#if HAS_HOTEND_OFFSET
current_position[Z_AXIS] += hotend_offset[Z_AXIS][active_extruder] - hotend_offset[Z_AXIS][tmp_extruder];
#endif
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) DEBUG_POS("(6) Apply Z offset", current_position);
#endif
#if ENABLED(DEBUG_LEVELING_FEATURE) #if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("Toolhead change done."); if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("Toolhead change done.");
#endif #endif