summaryrefslogtreecommitdiff
path: root/Sprinter
diff options
context:
space:
mode:
authorVyacheslav Kononenko <vyacheslav@kononenko.net>2012-02-13 13:51:43 -0500
committerVyacheslav Kononenko <vyacheslav@kononenko.net>2012-02-13 13:51:43 -0500
commite2e9fb45fa36cc9fe2be50b9133f1e17d00d015b (patch)
treead18440972a35b1caec16d92927080e2a3575f34 /Sprinter
parent0ff51036c47778562a39a011c639b792175642bd (diff)
changed homing function to not conflict with min_software_endstops/max_software_endstops
Diffstat (limited to 'Sprinter')
-rw-r--r--Sprinter/Sprinter.pde34
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;