changed homing function to not conflict with min_software_endstops/max_software_endstops
This commit is contained in:
parent
0ff51036c4
commit
e2e9fb45fa
1 changed files with 19 additions and 15 deletions
|
|
@ -583,16 +583,17 @@ inline void process_commands()
|
|||
|
||||
if((home_all_axis) || (code_seen(axis_codes[0]))) {
|
||||
if ((X_MIN_PIN > -1 && X_HOME_DIR==-1) || (X_MAX_PIN > -1 && X_HOME_DIR==1)){
|
||||
current_position[0] = 0;
|
||||
destination[0] = 1.5 * X_MAX_LENGTH * X_HOME_DIR;
|
||||
current_position[0] = -1.5 * X_MAX_LENGTH * X_HOME_DIR;
|
||||
destination[0] = 0;
|
||||
feedrate = homing_feedrate[0];
|
||||
prepare_move();
|
||||
|
||||
current_position[0] = 0;
|
||||
destination[0] = -5 * X_HOME_DIR;
|
||||
current_position[0] = 5 * X_HOME_DIR;
|
||||
destination[0] = 0;
|
||||
prepare_move();
|
||||
|
||||
destination[0] = 10 * X_HOME_DIR;
|
||||
current_position[0] = -10 * X_HOME_DIR;
|
||||
destination[0] = 0;
|
||||
prepare_move();
|
||||
|
||||
current_position[0] = (X_HOME_DIR == -1) ? 0 : X_MAX_LENGTH;
|
||||
|
|
@ -603,16 +604,18 @@ inline void process_commands()
|
|||
|
||||
if((home_all_axis) || (code_seen(axis_codes[1]))) {
|
||||
if ((Y_MIN_PIN > -1 && Y_HOME_DIR==-1) || (Y_MAX_PIN > -1 && Y_HOME_DIR==1)){
|
||||
current_position[1] = 0;
|
||||
destination[1] = 1.5 * Y_MAX_LENGTH * Y_HOME_DIR;
|
||||
current_position[1] = -1.5 * Y_MAX_LENGTH * Y_HOME_DIR;
|
||||
destination[1] = 0;
|
||||
|
||||
feedrate = homing_feedrate[1];
|
||||
prepare_move();
|
||||
|
||||
current_position[1] = 0;
|
||||
destination[1] = -5 * Y_HOME_DIR;
|
||||
current_position[1] = 5 * Y_HOME_DIR;
|
||||
destination[1] = 0;
|
||||
prepare_move();
|
||||
|
||||
destination[1] = 10 * Y_HOME_DIR;
|
||||
current_position[1] = -10 * Y_HOME_DIR;
|
||||
destination[1] = 0;
|
||||
prepare_move();
|
||||
|
||||
current_position[1] = (Y_HOME_DIR == -1) ? 0 : Y_MAX_LENGTH;
|
||||
|
|
@ -623,16 +626,17 @@ inline void process_commands()
|
|||
|
||||
if((home_all_axis) || (code_seen(axis_codes[2]))) {
|
||||
if ((Z_MIN_PIN > -1 && Z_HOME_DIR==-1) || (Z_MAX_PIN > -1 && Z_HOME_DIR==1)){
|
||||
current_position[2] = 0;
|
||||
destination[2] = 1.5 * Z_MAX_LENGTH * Z_HOME_DIR;
|
||||
current_position[2] = -1.5 * Z_MAX_LENGTH * Z_HOME_DIR;
|
||||
destination[2] = 0;
|
||||
feedrate = homing_feedrate[2];
|
||||
prepare_move();
|
||||
|
||||
current_position[2] = 0;
|
||||
destination[2] = -2 * Z_HOME_DIR;
|
||||
current_position[2] = 2 * Z_HOME_DIR;
|
||||
destination[2] = 0;
|
||||
prepare_move();
|
||||
|
||||
destination[2] = 10 * Z_HOME_DIR;
|
||||
current_position[2] = -5 * Z_HOME_DIR;
|
||||
destination[2] = 0;
|
||||
prepare_move();
|
||||
|
||||
current_position[2] = (Z_HOME_DIR == -1) ? 0 : Z_MAX_LENGTH;
|
||||
|
|
|
|||
Loading…
Reference in a new issue