|
@@ -4743,12 +4743,12 @@ void home_all_axes() { gcode_G28(true); }
|
4743
|
4743
|
// Retain the last probe position
|
4744
|
4744
|
xProbe = LOGICAL_X_POSITION(points[i].x);
|
4745
|
4745
|
yProbe = LOGICAL_Y_POSITION(points[i].y);
|
4746
|
|
- measured_z = points[i].z = faux ? 0.001 * random(-100, 101) : probe_pt(xProbe, yProbe, stow_probe_after_each, verbose_level);
|
4747
|
|
- }
|
4748
|
|
-
|
4749
|
|
- if (isnan(measured_z)) {
|
4750
|
|
- planner.abl_enabled = abl_should_enable;
|
4751
|
|
- return;
|
|
4746
|
+ measured_z = faux ? 0.001 * random(-100, 101) : probe_pt(xProbe, yProbe, stow_probe_after_each, verbose_level);
|
|
4747
|
+ if (isnan(measured_z)) {
|
|
4748
|
+ planner.abl_enabled = abl_should_enable;
|
|
4749
|
+ return;
|
|
4750
|
+ }
|
|
4751
|
+ points[i].z = measured_z;
|
4752
|
4752
|
}
|
4753
|
4753
|
|
4754
|
4754
|
if (!dryrun) {
|
|
@@ -5021,9 +5021,11 @@ void home_all_axes() { gcode_G28(true); }
|
5021
|
5021
|
|
5022
|
5022
|
const float measured_z = probe_pt(xpos, ypos, !code_seen('S') || code_value_bool(), 1);
|
5023
|
5023
|
|
5024
|
|
- SERIAL_PROTOCOLPAIR("Bed X: ", FIXFLOAT(xpos));
|
5025
|
|
- SERIAL_PROTOCOLPAIR(" Y: ", FIXFLOAT(ypos));
|
5026
|
|
- SERIAL_PROTOCOLLNPAIR(" Z: ", FIXFLOAT(measured_z));
|
|
5024
|
+ if (!isnan(measured_z)) {
|
|
5025
|
+ SERIAL_PROTOCOLPAIR("Bed X: ", FIXFLOAT(xpos));
|
|
5026
|
+ SERIAL_PROTOCOLPAIR(" Y: ", FIXFLOAT(ypos));
|
|
5027
|
+ SERIAL_PROTOCOLLNPAIR(" Z: ", FIXFLOAT(measured_z));
|
|
5028
|
+ }
|
5027
|
5029
|
|
5028
|
5030
|
clean_up_after_endstop_or_probe_move();
|
5029
|
5031
|
|
|
@@ -5170,13 +5172,13 @@ void home_all_axes() { gcode_G28(true); }
|
5170
|
5172
|
|
5171
|
5173
|
if (!do_all_positions && !do_circle_x3) { // probe the center
|
5172
|
5174
|
setup_for_endstop_or_probe_move();
|
5173
|
|
- z_at_pt[0] += probe_pt(0.0, 0.0 , true, 1);
|
|
5175
|
+ z_at_pt[0] += probe_pt(0.0, 0.0 , true, 1); // TODO: Needs error handling
|
5174
|
5176
|
clean_up_after_endstop_or_probe_move();
|
5175
|
5177
|
}
|
5176
|
5178
|
if (probe_center_plus_3) { // probe extra center points
|
5177
|
5179
|
for (int8_t axis = probe_center_plus_6 ? 11 : 9; axis > 0; axis -= probe_center_plus_6 ? 2 : 4) {
|
5178
|
5180
|
setup_for_endstop_or_probe_move();
|
5179
|
|
- z_at_pt[0] += probe_pt(
|
|
5181
|
+ z_at_pt[0] += probe_pt( // TODO: Needs error handling
|
5180
|
5182
|
cos(RADIANS(180 + 30 * axis)) * (0.1 * delta_calibration_radius),
|
5181
|
5183
|
sin(RADIANS(180 + 30 * axis)) * (0.1 * delta_calibration_radius), true, 1);
|
5182
|
5184
|
clean_up_after_endstop_or_probe_move();
|
|
@@ -5192,7 +5194,7 @@ void home_all_axes() { gcode_G28(true); }
|
5192
|
5194
|
do_circle_x2 ? (zig_zag ? 0.5 : 0.0) : 0);
|
5193
|
5195
|
for (float circles = -offset_circles ; circles <= offset_circles; circles++) {
|
5194
|
5196
|
setup_for_endstop_or_probe_move();
|
5195
|
|
- z_at_pt[axis] += probe_pt(
|
|
5197
|
+ z_at_pt[axis] += probe_pt( // TODO: Needs error handling
|
5196
|
5198
|
cos(RADIANS(180 + 30 * axis)) * delta_calibration_radius *
|
5197
|
5199
|
(1 + circles * 0.1 * (zig_zag ? 1 : -1)),
|
5198
|
5200
|
sin(RADIANS(180 + 30 * axis)) * delta_calibration_radius *
|
|
@@ -6372,7 +6374,8 @@ inline void gcode_M42() {
|
6372
|
6374
|
setup_for_endstop_or_probe_move();
|
6373
|
6375
|
|
6374
|
6376
|
// Move to the first point, deploy, and probe
|
6375
|
|
- probe_pt(X_probe_location, Y_probe_location, stow_probe_after_each, verbose_level);
|
|
6377
|
+ const float t = probe_pt(X_probe_location, Y_probe_location, stow_probe_after_each, verbose_level);
|
|
6378
|
+ if (isnan(t)) return;
|
6376
|
6379
|
|
6377
|
6380
|
randomSeed(millis());
|
6378
|
6381
|
|