diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index a6aa43e00..9b5af9c05 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -159,6 +159,7 @@ void FlushSerialRequestResend(); void ClearToSend(); void get_coordinates(); +void calculate_delta(float cartesian[3]); void prepare_move(); void kill(); void Stop(); diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 7cc574962..a4d09b372 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -169,6 +169,7 @@ int fanSpeed=0; //=========================================================================== const char axis_codes[NUM_AXIS] = {'X', 'Y', 'Z', 'E'}; static float destination[NUM_AXIS] = { 0.0, 0.0, 0.0, 0.0}; +static float delta[3] = {0.0, 0.0, 0.0}; static float offset[3] = {0.0, 0.0, 0.0}; static bool home_all_axis = true; static float feedrate = 1500.0, next_feedrate, saved_feedrate; @@ -731,34 +732,25 @@ void process_commands() feedrate = 0.0; home_all_axis = !((code_seen(axis_codes[0])) || (code_seen(axis_codes[1])) || (code_seen(axis_codes[2]))); - #if Z_HOME_DIR > 0 // If homing away from BED do Z first - if((home_all_axis) || (code_seen(axis_codes[Z_AXIS]))) { - HOMEAXIS(Z); - } - #endif - #ifdef QUICK_HOME - if((home_all_axis)||( code_seen(axis_codes[X_AXIS]) && code_seen(axis_codes[Y_AXIS])) ) //first diagonal move + if (home_all_axis) // Move all carriages up together until the first endstop is hit. { - current_position[X_AXIS] = 0;current_position[Y_AXIS] = 0; - + current_position[X_AXIS] = 0; + current_position[Y_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]); - destination[X_AXIS] = 1.5 * X_MAX_LENGTH * X_HOME_DIR;destination[Y_AXIS] = 1.5 * Y_MAX_LENGTH * Y_HOME_DIR; - feedrate = homing_feedrate[X_AXIS]; - if(homing_feedrate[Y_AXIS]