Fixed soft limits when the origin is in the middle.

HOME_POS is now always where the endstop is and can be outside the limits.
The limits are now defined by MIN_POS and MAX_POS rather than HOME_POS and MAX_LENGTH.
The Z is axis now homed first if direction is away from the bed.

Saguinololu limit pins change from MIN to MAX according to the homing direction.
This commit is contained in:
Chris Palmer
2012-06-02 13:17:47 +01:00
committed by Erik van der Zalm
parent 686011a548
commit 538189cc19
3 changed files with 51 additions and 19 deletions

View File

@ -187,9 +187,17 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
#define min_software_endstops true //If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops true //If true, axis won't move to coordinates greater than the defined lengths below.
#define X_MAX_LENGTH 205
#define Y_MAX_LENGTH 205
#define Z_MAX_LENGTH 200
// Travel limits after homing
#define X_MAX_POS 205
#define X_MIN_POS 0
#define Y_MAX_POS 205
#define Y_MIN_POS 0
#define Z_MAX_POS 200
#define Z_MIN_POS 0
#define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
#define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
#define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)
// The position of the homing switches. Use MAX_LENGTH * -0.5 if the center should be 0, 0, 0
#define X_HOME_POS 0