G80: correctly abort during crash detection

Crash detection is handled at a higher level (which automatically
repeats the current command), however we still need to abort the current
command correctly.

Handle XY crashes by checking the planner status after st_synchronize().
This commit is contained in:
Yuri D'Elia 2021-04-06 00:12:01 +02:00
parent 5da39df968
commit 5923276a86

View File

@ -3036,6 +3036,8 @@ static void gcode_G80()
plan_buffer_line_curposXYZE(XY_AXIS_FEEDRATE); plan_buffer_line_curposXYZE(XY_AXIS_FEEDRATE);
// Wait until the move is finished. // Wait until the move is finished.
st_synchronize(); st_synchronize();
if (waiting_inside_plan_buffer_line_print_aborted)
return;
uint8_t mesh_point = 0; //index number of calibration point uint8_t mesh_point = 0; //index number of calibration point
int Z_LIFT_FEEDRATE = homing_feedrate[Z_AXIS] / 40; int Z_LIFT_FEEDRATE = homing_feedrate[Z_AXIS] / 40;
@ -3105,6 +3107,8 @@ static void gcode_G80()
//printf_P(PSTR("after clamping: [%f;%f]\n"), current_position[X_AXIS], current_position[Y_AXIS]); //printf_P(PSTR("after clamping: [%f;%f]\n"), current_position[X_AXIS], current_position[Y_AXIS]);
plan_buffer_line_curposXYZE(XY_AXIS_FEEDRATE); plan_buffer_line_curposXYZE(XY_AXIS_FEEDRATE);
st_synchronize(); st_synchronize();
if (waiting_inside_plan_buffer_line_print_aborted)
return;
// Go down until endstop is hit // Go down until endstop is hit
const float Z_CALIBRATION_THRESHOLD = 1.f; const float Z_CALIBRATION_THRESHOLD = 1.f;