Tweak to M125 code

master
Scott Lahteine 7 years ago
parent b12eb33feb
commit 05a6d48753

@ -8608,7 +8608,6 @@ inline void gcode_M121() { endstops.enable_globally(false); }
* Z = override Z raise * Z = override Z raise
*/ */
inline void gcode_M125() { inline void gcode_M125() {
point_t park_point = NOZZLE_PARK_POINT;
// Initial retract before move to filament change position // Initial retract before move to filament change position
const float retract = parser.seen('L') ? parser.value_axis_units(E_AXIS) : 0 const float retract = parser.seen('L') ? parser.value_axis_units(E_AXIS) : 0
@ -8617,16 +8616,14 @@ inline void gcode_M121() { endstops.enable_globally(false); }
#endif #endif
; ;
// Lift Z axis point_t park_point = NOZZLE_PARK_POINT;
if (parser.seenval('Z'))
park_point.z = parser.linearval('Z');
// Move XY axes to filament change position or given position // Move XY axes to filament change position or given position
if (parser.seenval('X')) if (parser.seenval('X')) park_point.x = parser.linearval('X');
park_point.x = parser.linearval('X'); if (parser.seenval('Y')) park_point.y = parser.linearval('Y');
if (parser.seenval('Y')) // Lift Z axis
park_point.y = parser.linearval('Y'); if (parser.seenval('Z')) park_point.z = parser.linearval('Z');
#if HOTENDS > 1 && DISABLED(DUAL_X_CARRIAGE) #if HOTENDS > 1 && DISABLED(DUAL_X_CARRIAGE)
park_point.x += (active_extruder ? hotend_offset[X_AXIS][active_extruder] : 0); park_point.x += (active_extruder ? hotend_offset[X_AXIS][active_extruder] : 0);

Loading…
Cancel
Save