diff options
author | kliment <kliment.yanev@gmail.com> | 2011-07-16 14:33:13 +0200 |
---|---|---|
committer | kliment <kliment.yanev@gmail.com> | 2011-07-16 14:33:13 +0200 |
commit | 087446265503c03202fe363ee08458e929f94716 (patch) | |
tree | c990571951d0c9e8e75f595b2daa7a98d6080aa6 | |
parent | a5ded5b75fe6d512b74bca5e5c87e9e66995b997 (diff) | |
parent | 9c247a305c830530c09a822b69c685b02abecfbe (diff) |
Merge branch 'master' of github.com:kliment/Sprinter into experimental
-rw-r--r-- | Sprinter/Sprinter.pde | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/Sprinter/Sprinter.pde b/Sprinter/Sprinter.pde index 8578359..0406d73 100644 --- a/Sprinter/Sprinter.pde +++ b/Sprinter/Sprinter.pde @@ -541,8 +541,7 @@ inline void process_commands() case 28: //G28 Home all Axis one at a time saved_feedrate = feedrate; for(int i=0; i < NUM_AXIS; i++) { - destination[i] = 0; - current_position[i] = 0; + destination[i] = current_position[i]; } feedrate = 0; @@ -562,8 +561,8 @@ inline void process_commands() destination[0] = 10 * X_HOME_DIR; prepare_move(); - current_position[0] = 0; - destination[0] = 0; + current_position[0] = (X_HOME_DIR == -1) ? 0 : X_MAX_LENGTH; + destination[0] = current_position[0]; feedrate = 0; } } @@ -582,8 +581,8 @@ inline void process_commands() destination[1] = 10 * Y_HOME_DIR; prepare_move(); - current_position[1] = 0; - destination[1] = 0; + current_position[1] = (Y_HOME_DIR == -1) ? 0 : Y_MAX_LENGTH; + destination[1] = current_position[1]; feedrate = 0; } } @@ -602,8 +601,8 @@ inline void process_commands() destination[2] = 10 * Z_HOME_DIR; prepare_move(); - current_position[2] = 0; - destination[2] = 0; + current_position[2] = (Z_HOME_DIR == -1) ? 0 : Z_MAX_LENGTH; + destination[2] = current_position[2]; feedrate = 0; } |