HOTEND_OFFSET_Z always available (#11603)

This commit is contained in:
Kevin
2018-08-22 07:21:29 +02:00
committed by Scott Lahteine
parent f8c52c9c29
commit 6483285bc5
71 changed files with 215 additions and 281 deletions

View File

@ -415,12 +415,14 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
#endif
const float xdiff = hotend_offset[X_AXIS][tmp_extruder] - hotend_offset[X_AXIS][active_extruder],
ydiff = hotend_offset[Y_AXIS][tmp_extruder] - hotend_offset[Y_AXIS][active_extruder];
ydiff = hotend_offset[Y_AXIS][tmp_extruder] - hotend_offset[Y_AXIS][active_extruder],
zdiff = hotend_offset[Z_AXIS][tmp_extruder] - hotend_offset[Z_AXIS][active_extruder];
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) {
SERIAL_ECHOPAIR("Offset Tool XY by { ", xdiff);
SERIAL_ECHOPAIR(", ", ydiff);
SERIAL_ECHOPAIR(", ", zdiff);
SERIAL_ECHOLNPGM(" }");
}
#endif
@ -428,6 +430,7 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
// The newly-selected extruder XY is actually at...
current_position[X_AXIS] += xdiff;
current_position[Y_AXIS] += ydiff;
current_position[Z_AXIS] += zdiff;
// Set the new active extruder
active_extruder = tmp_extruder;