Merge pull request #5109 from thinkyhead/rc_eeprom_M218_tool_offset
Save hotend_offset array (M218) in EEPROM
This commit is contained in:
@@ -481,13 +481,7 @@ static uint8_t target_extruder;
|
||||
|
||||
// Extruder offsets
|
||||
#if HOTENDS > 1
|
||||
float hotend_offset[][HOTENDS] = {
|
||||
HOTEND_OFFSET_X,
|
||||
HOTEND_OFFSET_Y
|
||||
#ifdef HOTEND_OFFSET_Z
|
||||
, HOTEND_OFFSET_Z
|
||||
#endif
|
||||
};
|
||||
float hotend_offset[XYZ][HOTENDS];
|
||||
#endif
|
||||
|
||||
#if HAS_Z_SERVO_ENDSTOP
|
||||
@@ -6129,7 +6123,7 @@ inline void gcode_M211() {
|
||||
* Z<zoffset> - Available with DUAL_X_CARRIAGE and SWITCHING_EXTRUDER
|
||||
*/
|
||||
inline void gcode_M218() {
|
||||
if (get_target_extruder_from_command(218)) return;
|
||||
if (get_target_extruder_from_command(218) || target_extruder == 0) return;
|
||||
|
||||
if (code_seen('X')) hotend_offset[X_AXIS][target_extruder] = code_value_axis_units(X_AXIS);
|
||||
if (code_seen('Y')) hotend_offset[Y_AXIS][target_extruder] = code_value_axis_units(Y_AXIS);
|
||||
|
Reference in New Issue
Block a user