|
@@ -978,6 +978,27 @@ static void retract_z_probe() {
|
978
|
978
|
#endif
|
979
|
979
|
}
|
980
|
980
|
|
|
981
|
+/// Probe bed height at position (x,y), returns the measured z value
|
|
982
|
+static float probe_pt(float x, float y, float z_before) {
|
|
983
|
+ // move to right place
|
|
984
|
+ do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], z_before);
|
|
985
|
+ do_blocking_move_to(x - X_PROBE_OFFSET_FROM_EXTRUDER, y - Y_PROBE_OFFSET_FROM_EXTRUDER, current_position[Z_AXIS]);
|
|
986
|
+
|
|
987
|
+ engage_z_probe(); // Engage Z Servo endstop if available
|
|
988
|
+ run_z_probe();
|
|
989
|
+ float measured_z = current_position[Z_AXIS];
|
|
990
|
+ retract_z_probe();
|
|
991
|
+
|
|
992
|
+ SERIAL_PROTOCOLPGM("Bed x: ");
|
|
993
|
+ SERIAL_PROTOCOL(x);
|
|
994
|
+ SERIAL_PROTOCOLPGM(" y: ");
|
|
995
|
+ SERIAL_PROTOCOL(y);
|
|
996
|
+ SERIAL_PROTOCOLPGM(" z: ");
|
|
997
|
+ SERIAL_PROTOCOL(measured_z);
|
|
998
|
+ SERIAL_PROTOCOLPGM("\n");
|
|
999
|
+ return measured_z;
|
|
1000
|
+}
|
|
1001
|
+
|
981
|
1002
|
#endif // #ifdef ENABLE_AUTO_BED_LEVELING
|
982
|
1003
|
|
983
|
1004
|
static void homeaxis(int axis) {
|