|
|
@ -509,11 +509,9 @@ bool code_seen(char code) |
|
|
|
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder); \ |
|
|
|
\ |
|
|
|
current_position[LETTER##_AXIS] = (LETTER##_HOME_DIR == -1) ? 0 : LETTER##_MAX_LENGTH;\ |
|
|
|
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);\ |
|
|
|
destination[LETTER##_AXIS] = current_position[LETTER##_AXIS];\ |
|
|
|
feedrate = 0.0;\ |
|
|
|
st_synchronize();\ |
|
|
|
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);\ |
|
|
|
endstops_hit_on_purpose();\ |
|
|
|
} |
|
|
|
|
|
|
@ -567,7 +565,7 @@ void process_commands() |
|
|
|
feedrate = 0.0; |
|
|
|
home_all_axis = !((code_seen(axis_codes[0])) || (code_seen(axis_codes[1])) || (code_seen(axis_codes[2]))); |
|
|
|
#ifdef QUICK_HOME |
|
|
|
if( code_seen(axis_codes[0]) && code_seen(axis_codes[1]) ) //first diagonal move |
|
|
|
if( code_seen(axis_codes[X_AXIS]) && code_seen(axis_codes[Y_AXIS]) ) //first diagonal move |
|
|
|
{ |
|
|
|
current_position[X_AXIS] = 0;current_position[Y_AXIS] = 0; |
|
|
|
|
|
|
@ -585,10 +583,10 @@ void process_commands() |
|
|
|
destination[Y_AXIS] = current_position[Y_AXIS]; |
|
|
|
feedrate = 0.0; |
|
|
|
st_synchronize(); |
|
|
|
plan_set_position(0, 0, current_position[Z_AXIS], current_position[E_AXIS]); |
|
|
|
current_position[X_AXIS] = 0;current_position[Y_AXIS] = 0; |
|
|
|
endstops_hit_on_purpose(); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
#endif |
|
|
|
|
|
|
|
if((home_all_axis) || (code_seen(axis_codes[X_AXIS]))) |
|
|
@ -599,7 +597,11 @@ void process_commands() |
|
|
|
if((home_all_axis) || (code_seen(axis_codes[Y_AXIS]))) { |
|
|
|
HOMEAXIS(Y); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#ifdef QUICK_HOME |
|
|
|
} |
|
|
|
#endif |
|
|
|
|
|
|
|
if((home_all_axis) || (code_seen(axis_codes[Z_AXIS]))) { |
|
|
|
HOMEAXIS(Z); |
|
|
|
} |
|
|
@ -616,6 +618,8 @@ void process_commands() |
|
|
|
if(code_seen(axis_codes[Z_AXIS])) { |
|
|
|
current_position[2]=code_value()+add_homeing[2]; |
|
|
|
} |
|
|
|
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]); |
|
|
|
|
|
|
|
#ifdef ENDSTOPS_ONLY_FOR_HOMING |
|
|
|
enable_endstops(false); |
|
|
|
#endif |
|
|
@ -1254,19 +1258,6 @@ void get_arc_coordinates() |
|
|
|
|
|
|
|
void prepare_move() |
|
|
|
{ |
|
|
|
|
|
|
|
if (min_software_endstops) { |
|
|
|
if (destination[X_AXIS] < 0) destination[X_AXIS] = 0.0; |
|
|
|
if (destination[Y_AXIS] < 0) destination[Y_AXIS] = 0.0; |
|
|
|
if (destination[Z_AXIS] < 0) destination[Z_AXIS] = 0.0; |
|
|
|
} |
|
|
|
|
|
|
|
if (max_software_endstops) { |
|
|
|
if (destination[X_AXIS] > X_MAX_LENGTH) destination[X_AXIS] = X_MAX_LENGTH; |
|
|
|
if (destination[Y_AXIS] > Y_MAX_LENGTH) destination[Y_AXIS] = Y_MAX_LENGTH; |
|
|
|
if (destination[Z_AXIS] > Z_MAX_LENGTH) destination[Z_AXIS] = Z_MAX_LENGTH; |
|
|
|
} |
|
|
|
|
|
|
|
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate*feedmultiply/60/100.0, active_extruder); |
|
|
|
for(int8_t i=0; i < NUM_AXIS; i++) { |
|
|
|
current_position[i] = destination[i]; |
|
|
|