|
@@ -4788,12 +4788,12 @@ void home_all_axes() { gcode_G28(true); }
|
4788
|
4788
|
// Retain the last probe position
|
4789
|
4789
|
xProbe = LOGICAL_X_POSITION(points[i].x);
|
4790
|
4790
|
yProbe = LOGICAL_Y_POSITION(points[i].y);
|
4791
|
|
- measured_z = points[i].z = faux ? 0.001 * random(-100, 101) : probe_pt(xProbe, yProbe, stow_probe_after_each, verbose_level);
|
4792
|
|
- }
|
4793
|
|
-
|
4794
|
|
- if (isnan(measured_z)) {
|
4795
|
|
- planner.abl_enabled = abl_should_enable;
|
4796
|
|
- return;
|
|
4791
|
+ measured_z = faux ? 0.001 * random(-100, 101) : probe_pt(xProbe, yProbe, stow_probe_after_each, verbose_level);
|
|
4792
|
+ if (isnan(measured_z)) {
|
|
4793
|
+ planner.abl_enabled = abl_should_enable;
|
|
4794
|
+ return;
|
|
4795
|
+ }
|
|
4796
|
+ points[i].z = measured_z;
|
4797
|
4797
|
}
|
4798
|
4798
|
|
4799
|
4799
|
if (!dryrun) {
|
|
@@ -5066,9 +5066,11 @@ void home_all_axes() { gcode_G28(true); }
|
5066
|
5066
|
|
5067
|
5067
|
const float measured_z = probe_pt(xpos, ypos, !code_seen('S') || code_value_bool(), 1);
|
5068
|
5068
|
|
5069
|
|
- SERIAL_PROTOCOLPAIR("Bed X: ", FIXFLOAT(xpos));
|
5070
|
|
- SERIAL_PROTOCOLPAIR(" Y: ", FIXFLOAT(ypos));
|
5071
|
|
- SERIAL_PROTOCOLLNPAIR(" Z: ", FIXFLOAT(measured_z));
|
|
5069
|
+ if (!isnan(measured_z)) {
|
|
5070
|
+ SERIAL_PROTOCOLPAIR("Bed X: ", FIXFLOAT(xpos));
|
|
5071
|
+ SERIAL_PROTOCOLPAIR(" Y: ", FIXFLOAT(ypos));
|
|
5072
|
+ SERIAL_PROTOCOLLNPAIR(" Z: ", FIXFLOAT(measured_z));
|
|
5073
|
+ }
|
5072
|
5074
|
|
5073
|
5075
|
clean_up_after_endstop_or_probe_move();
|
5074
|
5076
|
|
|
@@ -5215,13 +5217,13 @@ void home_all_axes() { gcode_G28(true); }
|
5215
|
5217
|
|
5216
|
5218
|
if (!do_all_positions && !do_circle_x3) { // probe the center
|
5217
|
5219
|
setup_for_endstop_or_probe_move();
|
5218
|
|
- z_at_pt[0] += probe_pt(0.0, 0.0 , true, 1);
|
|
5220
|
+ z_at_pt[0] += probe_pt(0.0, 0.0 , true, 1); // TODO: Needs error handling
|
5219
|
5221
|
clean_up_after_endstop_or_probe_move();
|
5220
|
5222
|
}
|
5221
|
5223
|
if (probe_center_plus_3) { // probe extra center points
|
5222
|
5224
|
for (int8_t axis = probe_center_plus_6 ? 11 : 9; axis > 0; axis -= probe_center_plus_6 ? 2 : 4) {
|
5223
|
5225
|
setup_for_endstop_or_probe_move();
|
5224
|
|
- z_at_pt[0] += probe_pt(
|
|
5226
|
+ z_at_pt[0] += probe_pt( // TODO: Needs error handling
|
5225
|
5227
|
cos(RADIANS(180 + 30 * axis)) * (0.1 * delta_calibration_radius),
|
5226
|
5228
|
sin(RADIANS(180 + 30 * axis)) * (0.1 * delta_calibration_radius), true, 1);
|
5227
|
5229
|
clean_up_after_endstop_or_probe_move();
|
|
@@ -5237,7 +5239,7 @@ void home_all_axes() { gcode_G28(true); }
|
5237
|
5239
|
do_circle_x2 ? (zig_zag ? 0.5 : 0.0) : 0);
|
5238
|
5240
|
for (float circles = -offset_circles ; circles <= offset_circles; circles++) {
|
5239
|
5241
|
setup_for_endstop_or_probe_move();
|
5240
|
|
- z_at_pt[axis] += probe_pt(
|
|
5242
|
+ z_at_pt[axis] += probe_pt( // TODO: Needs error handling
|
5241
|
5243
|
cos(RADIANS(180 + 30 * axis)) * delta_calibration_radius *
|
5242
|
5244
|
(1 + circles * 0.1 * (zig_zag ? 1 : -1)),
|
5243
|
5245
|
sin(RADIANS(180 + 30 * axis)) * delta_calibration_radius *
|
|
@@ -6417,7 +6419,8 @@ inline void gcode_M42() {
|
6417
|
6419
|
setup_for_endstop_or_probe_move();
|
6418
|
6420
|
|
6419
|
6421
|
// Move to the first point, deploy, and probe
|
6420
|
|
- probe_pt(X_probe_location, Y_probe_location, stow_probe_after_each, verbose_level);
|
|
6422
|
+ const float t = probe_pt(X_probe_location, Y_probe_location, stow_probe_after_each, verbose_level);
|
|
6423
|
+ if (isnan(t)) return;
|
6421
|
6424
|
|
6422
|
6425
|
randomSeed(millis());
|
6423
|
6426
|
|