Pull in changes from #5
This commit is contained in:
parent
f1cba64e56
commit
0c383e20b3
|
|
@ -7832,7 +7832,7 @@ bool lcd_selftest()
|
|||
|
||||
static void reset_crash_det(unsigned char axis) {
|
||||
current_position[axis] += 10;
|
||||
plan_buffer_line_curposXYZE(manual_feedrate[0] / 60, active_extruder);
|
||||
plan_buffer_line_curposXYZE(homing_feedrate[axis] / 60, active_extruder);
|
||||
st_synchronize();
|
||||
if (eeprom_read_byte((uint8_t*)EEPROM_CRASH_DET)) tmc2130_sg_stop_on_crash = true;
|
||||
}
|
||||
|
|
@ -7853,17 +7853,15 @@ static bool lcd_selfcheck_axis_sg(unsigned char axis) {
|
|||
tmc2130_home_exit();
|
||||
enable_endstops(true);
|
||||
|
||||
if (axis == X_AXIS) { //there is collision between cables and PSU cover in X axis if Z coordinate is too low
|
||||
raise_z_above(17,true);
|
||||
tmc2130_home_enter(Z_AXIS_MASK);
|
||||
st_synchronize();
|
||||
tmc2130_home_exit();
|
||||
}
|
||||
|
||||
raise_z_above(MESH_HOME_Z_SEARCH);
|
||||
st_synchronize();
|
||||
tmc2130_home_enter(1 << axis);
|
||||
|
||||
// first axis length measurement begin
|
||||
|
||||
current_position[axis] -= (axis_length + margin);
|
||||
plan_buffer_line_curposXYZE(manual_feedrate[0] / 60, active_extruder);
|
||||
plan_buffer_line_curposXYZE(homing_feedrate[axis] / 60, active_extruder);
|
||||
|
||||
|
||||
st_synchronize();
|
||||
|
|
@ -7873,11 +7871,11 @@ static bool lcd_selfcheck_axis_sg(unsigned char axis) {
|
|||
current_position_init = st_get_position_mm(axis);
|
||||
|
||||
current_position[axis] += 2 * margin;
|
||||
plan_buffer_line_curposXYZE(manual_feedrate[0] / 60, active_extruder);
|
||||
plan_buffer_line_curposXYZE(homing_feedrate[axis] / 60, active_extruder);
|
||||
st_synchronize();
|
||||
|
||||
current_position[axis] += axis_length;
|
||||
plan_buffer_line_curposXYZE(manual_feedrate[0] / 60, active_extruder);
|
||||
plan_buffer_line_curposXYZE(homing_feedrate[axis] / 60, active_extruder);
|
||||
|
||||
st_synchronize();
|
||||
|
||||
|
|
@ -7893,11 +7891,11 @@ static bool lcd_selfcheck_axis_sg(unsigned char axis) {
|
|||
|
||||
|
||||
current_position[axis] -= margin;
|
||||
plan_buffer_line_curposXYZE(manual_feedrate[0] / 60, active_extruder);
|
||||
plan_buffer_line_curposXYZE(homing_feedrate[axis] / 60, active_extruder);
|
||||
st_synchronize();
|
||||
|
||||
current_position[axis] -= (axis_length + margin);
|
||||
plan_buffer_line_curposXYZE(manual_feedrate[0] / 60, active_extruder);
|
||||
plan_buffer_line_curposXYZE(homing_feedrate[axis] / 60, active_extruder);
|
||||
|
||||
st_synchronize();
|
||||
|
||||
|
|
@ -7905,6 +7903,7 @@ static bool lcd_selfcheck_axis_sg(unsigned char axis) {
|
|||
|
||||
measured_axis_length[1] = abs(current_position_final - current_position_init);
|
||||
|
||||
tmc2130_home_exit();
|
||||
|
||||
//end of second measurement, now check for possible errors:
|
||||
|
||||
|
|
@ -7923,6 +7922,8 @@ static bool lcd_selfcheck_axis_sg(unsigned char axis) {
|
|||
current_position[axis] = 0;
|
||||
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
|
||||
reset_crash_det(axis);
|
||||
enable_endstops(true);
|
||||
endstops_hit_on_purpose();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -7941,12 +7942,13 @@ static bool lcd_selfcheck_axis_sg(unsigned char axis) {
|
|||
current_position[axis] = 0;
|
||||
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
|
||||
reset_crash_det(axis);
|
||||
|
||||
endstops_hit_on_purpose();
|
||||
return false;
|
||||
}
|
||||
current_position[axis] = 0;
|
||||
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
|
||||
reset_crash_det(axis);
|
||||
endstops_hit_on_purpose();
|
||||
return true;
|
||||
}
|
||||
#endif //TMC2130
|
||||
|
|
|
|||
Loading…
Reference in New Issue