From 5f12289339cbef144aad57e5904d2d7b4a600d71 Mon Sep 17 00:00:00 2001 From: Robert Pelnar Date: Wed, 25 Apr 2018 14:43:32 +0200 Subject: [PATCH] CalibrationZ/MK3 - check crash Z after homeaxis (kill with message "debris on nozzle...") --- Firmware/mesh_bed_calibration.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Firmware/mesh_bed_calibration.cpp b/Firmware/mesh_bed_calibration.cpp index 9c5b1271..e8ed5cda 100644 --- a/Firmware/mesh_bed_calibration.cpp +++ b/Firmware/mesh_bed_calibration.cpp @@ -2683,6 +2683,15 @@ bool sample_mesh_and_store_reference() memcpy(destination, current_position, sizeof(destination)); enable_endstops(true); homeaxis(Z_AXIS); + +#ifdef TMC2130 + if (!axis_known_position[Z_AXIS] && (READ(Z_TMC2130_DIAG) != 0)) //Z crash + { + kill(MSG_BED_LEVELING_FAILED_POINT_LOW); + return false; + } +#endif //TMC2130 + enable_endstops(false); find_bed_induction_sensor_point_z(); mbl.set_z(0, 0, current_position[Z_AXIS]);