diff options
-rw-r--r-- | Sprinter/Sprinter.pde | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/Sprinter/Sprinter.pde b/Sprinter/Sprinter.pde index e3126b8..0462c95 100644 --- a/Sprinter/Sprinter.pde +++ b/Sprinter/Sprinter.pde @@ -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; |