Skip to content

Commit

Permalink
Nozzle park x/y only axis
Browse files Browse the repository at this point in the history
  • Loading branch information
studiodyne committed Apr 24, 2020
1 parent 2efbca5 commit ae6b34c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1501,6 +1501,8 @@
#if ENABLED(NOZZLE_PARK_FEATURE)
// Specify a park position as { X, Y, Z_raise }
#define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
//#define NOZZLE_PARK_X_ONLY
//#define NOZZLE_PARK_Y_ONLY
#define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis)
#define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers)
#endif
Expand Down
9 changes: 8 additions & 1 deletion Marlin/src/libs/nozzle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,14 @@ Nozzle nozzle;
do_blocking_move_to_z(_MAX(park.z, current_position.z), fr_z);
}

do_blocking_move_to_xy(park, fr_xy);
#if EITHER(NOZZLE_PARK_X_ONLY , NOZZLE_PARK_Y_ONLY )
xyz_pos_t park_ = park ;
TERN_( NOZZLE_PARK_X_ONLY, park_.y = current_position.y );
TERN_( NOZZLE_PARK_Y_ONLY, park_.x = current_position.x );
do_blocking_move_to_xy(park_ , fr_xy) ;
#else
do_blocking_move_to_xy(park_, fr_xy) ;
#endif

report_current_position();
}
Expand Down

0 comments on commit ae6b34c

Please sign in to comment.