{X,Y,Z}_{MIN,MAX}_POS are actually in Gcode coordinates.
This commit is contained in:
parent
1c2ecddae4
commit
9e7b5056a0
|
@ -275,16 +275,14 @@ const bool Z_ENDSTOPS_INVERTING = false; // set to true to invert the logic of t
|
||||||
#define Y_HOME_DIR 1
|
#define Y_HOME_DIR 1
|
||||||
#define Z_HOME_DIR 1
|
#define Z_HOME_DIR 1
|
||||||
|
|
||||||
#define min_software_endstops false //If true, axis won't move to coordinates less than HOME_POS.
|
#define min_software_endstops true //If true, axis won't move to coordinates less than *_MIN_POS.
|
||||||
#define max_software_endstops false //If true, axis won't move to coordinates greater than the defined lengths below.
|
#define max_software_endstops true //If true, axis won't move to coordinates greater than *_MAX_POS.
|
||||||
|
|
||||||
// Travel limits after homing
|
#define X_MAX_POS 90
|
||||||
// For deltabots, the MAX_POS doesn't have to be exact, it will be recalculated from MANUAL_Z_HOME_POS below.
|
#define X_MIN_POS -90
|
||||||
#define X_MAX_POS 620
|
#define Y_MAX_POS 90
|
||||||
#define X_MIN_POS 0
|
#define Y_MIN_POS -90
|
||||||
#define Y_MAX_POS 620
|
#define Z_MAX_POS MANUAL_Z_HOME_POS
|
||||||
#define Y_MIN_POS 0
|
|
||||||
#define Z_MAX_POS 620
|
|
||||||
#define Z_MIN_POS 0
|
#define Z_MIN_POS 0
|
||||||
|
|
||||||
#define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
|
#define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
|
||||||
|
|
|
@ -618,7 +618,7 @@ static void homeaxis(int axis) {
|
||||||
0) {
|
0) {
|
||||||
current_position[axis] = 0;
|
current_position[axis] = 0;
|
||||||
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
|
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
|
||||||
destination[axis] = 1.5 * max_length(axis) * home_dir(axis);
|
destination[axis] = 3 * Z_MAX_LENGTH;
|
||||||
feedrate = homing_feedrate[axis];
|
feedrate = homing_feedrate[axis];
|
||||||
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder);
|
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder);
|
||||||
st_synchronize();
|
st_synchronize();
|
||||||
|
@ -740,9 +740,9 @@ void process_commands()
|
||||||
current_position[Z_AXIS] = 0;
|
current_position[Z_AXIS] = 0;
|
||||||
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
|
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
|
||||||
|
|
||||||
destination[X_AXIS] = 1.5 * X_MAX_LENGTH * X_HOME_DIR;
|
destination[X_AXIS] = 3 * Z_MAX_LENGTH;
|
||||||
destination[Y_AXIS] = 1.5 * Y_MAX_LENGTH * Y_HOME_DIR;
|
destination[Y_AXIS] = 3 * Z_MAX_LENGTH;
|
||||||
destination[Z_AXIS] = 1.5 * Z_MAX_LENGTH * Z_HOME_DIR;
|
destination[Z_AXIS] = 3 * Z_MAX_LENGTH;
|
||||||
feedrate = 1.732 * homing_feedrate[X_AXIS];
|
feedrate = 1.732 * homing_feedrate[X_AXIS];
|
||||||
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder);
|
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder);
|
||||||
st_synchronize();
|
st_synchronize();
|
||||||
|
|
Loading…
Reference in a new issue