summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkliment <kliment.yanev@gmail.com>2011-07-10 20:21:14 +0200
committerkliment <kliment.yanev@gmail.com>2011-07-10 20:21:14 +0200
commite1a7710461a6de1e2fe4574899d048df0a0c732f (patch)
tree4572cc3d2dd1febcd28c0ce4135ad373449de72b
parent4491d2a085e333bd3e8d62e1fd792e456548f7de (diff)
Fix G28 command
-rw-r--r--Sprinter/Sprinter.pde21
1 files changed, 11 insertions, 10 deletions
diff --git a/Sprinter/Sprinter.pde b/Sprinter/Sprinter.pde
index 975f8fd..3961019 100644
--- a/Sprinter/Sprinter.pde
+++ b/Sprinter/Sprinter.pde
@@ -478,8 +478,8 @@ inline void process_commands()
home_all_axis = !((code_seen(axis_codes[0])) || (code_seen(axis_codes[1])) || (code_seen(axis_codes[2])));
- if((home_all_axis) || (code_seen('X'))) {
- #if ((X_MIN_PIN > -1 && X_HOME_DIR==-1) || (X_MAX_PIN > -1 && X_HOME_DIR==1))
+ 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;
feedrate = max_start_speed_units_per_second[0] * 60;
@@ -495,11 +495,11 @@ inline void process_commands()
current_position[0] = 0;
destination[0] = 0;
feedrate = 0;
- #endif
+ }
}
- if((home_all_axis) || (code_seen('X'))) {
- #if ((Y_MIN_PIN > -1 && Y_HOME_DIR==-1) || (Y_MAX_PIN > -1 && Y_HOME_DIR==1))
+ 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;
feedrate = max_start_speed_units_per_second[1] * 60;
@@ -515,18 +515,18 @@ inline void process_commands()
current_position[1] = 0;
destination[1] = 0;
feedrate = 0;
- #endif
+ }
}
- if((home_all_axis) || (code_seen('X'))) {
- #if ((Z_MIN_PIN > -1 && Z_HOME_DIR==-1) || (Z_MAX_PIN > -1 && Z_HOME_DIR==1))
+ 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;
feedrate = max_feedrate[2]/2;
prepare_move();
current_position[2] = 0;
- destination[2] = -5 * Z_HOME_DIR;
+ destination[2] = -2 * Z_HOME_DIR;
prepare_move();
destination[2] = 10 * Z_HOME_DIR;
@@ -535,7 +535,8 @@ inline void process_commands()
current_position[2] = 0;
destination[2] = 0;
feedrate = 0;
- #endif
+
+ }
}
feedrate = saved_feedrate;