From edf376ce0d33d6157e9a1be94dfe6c8af15ae7df Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 12 Apr 2016 17:15:10 -0700 Subject: [PATCH 1/2] Fix: gcode_T using non-existent Z offset As noted by @snowzach in #3461 --- Marlin/Marlin_main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index d0cdf0a496..8fe7bc211c 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -6178,10 +6178,10 @@ inline void gcode_T(uint8_t tmp_extruder) { // Offset extruder, make sure to apply the bed level rotation matrix vector_3 tmp_offset_vec = vector_3(extruder_offset[X_AXIS][tmp_extruder], extruder_offset[Y_AXIS][tmp_extruder], - extruder_offset[Z_AXIS][tmp_extruder]), + 0), act_offset_vec = vector_3(extruder_offset[X_AXIS][active_extruder], extruder_offset[Y_AXIS][active_extruder], - extruder_offset[Z_AXIS][active_extruder]), + 0), offset_vec = tmp_offset_vec - act_offset_vec; offset_vec.apply_rotation(plan_bed_level_matrix.transpose(plan_bed_level_matrix)); current_position[X_AXIS] += offset_vec.x; From 46881c846c2a13a0e9c2882d171182299921bd90 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 12 Apr 2016 17:16:58 -0700 Subject: [PATCH 2/2] Add comments for extruder offset options --- Marlin/Marlin_main.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 8fe7bc211c..486e0e734f 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -322,16 +322,16 @@ static uint8_t target_extruder; // Extruder offsets #if EXTRUDERS > 1 #ifndef EXTRUDER_OFFSET_X - #define EXTRUDER_OFFSET_X { 0 } + #define EXTRUDER_OFFSET_X { 0 } // X offsets for each extruder #endif #ifndef EXTRUDER_OFFSET_Y - #define EXTRUDER_OFFSET_Y { 0 } + #define EXTRUDER_OFFSET_Y { 0 } // Y offsets for each extruder #endif float extruder_offset[][EXTRUDERS] = { EXTRUDER_OFFSET_X, EXTRUDER_OFFSET_Y #if ENABLED(DUAL_X_CARRIAGE) - , { 0 } // supports offsets in XYZ plane + , { 0 } // Z offsets for each extruder #endif }; #endif @@ -5144,7 +5144,12 @@ inline void gcode_M206() { #if EXTRUDERS > 1 /** - * M218 - set hotend offset (in mm), T X Y + * M218 - set hotend offset (in mm) + * + * T + * X + * Y + * Z - Available with DUAL_X_CARRIAGE */ inline void gcode_M218() { if (setTargetedHotend(218)) return;