|
@@ -3019,12 +3019,12 @@ static void homeaxis(const AxisEnum axis) {
|
3019
|
3019
|
// so here it re-homes each tower in turn.
|
3020
|
3020
|
// Delta homing treats the axes as normal linear axes.
|
3021
|
3021
|
|
3022
|
|
- // retrace by the amount specified in endstop_adj
|
3023
|
|
- if (endstop_adj[axis] * Z_HOME_DIR < 0) {
|
|
3022
|
+ // retrace by the amount specified in endstop_adj + additional 0.1mm in order to have minimum steps
|
|
3023
|
+ if (endstop_adj[axis] * Z_HOME_DIR <= 0) {
|
3024
|
3024
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
3025
|
3025
|
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("endstop_adj:");
|
3026
|
3026
|
#endif
|
3027
|
|
- do_homing_move(axis, endstop_adj[axis]);
|
|
3027
|
+ do_homing_move(axis, endstop_adj[axis] - 0.1);
|
3028
|
3028
|
}
|
3029
|
3029
|
|
3030
|
3030
|
#else
|
|
@@ -5098,20 +5098,18 @@ void home_all_axes() { gcode_G28(true); }
|
5098
|
5098
|
*
|
5099
|
5099
|
* Parameters:
|
5100
|
5100
|
*
|
5101
|
|
- * P Number of probe points:
|
|
5101
|
+ * Pn Number of probe points:
|
5102
|
5102
|
*
|
5103
|
5103
|
* P1 Probe center and set height only.
|
5104
|
5104
|
* P2 Probe center and towers. Set height, endstops, and delta radius.
|
5105
|
5105
|
* P3 Probe all positions: center, towers and opposite towers. Set all.
|
5106
|
5106
|
* P4-P7 Probe all positions at different locations and average them.
|
5107
|
5107
|
*
|
5108
|
|
- * A Abort delta height calibration after 1 probe (only P1)
|
5109
|
|
- *
|
5110
|
|
- * O Use opposite tower points instead of tower points (only P2)
|
5111
|
|
- *
|
5112
|
|
- * T Don't calibrate tower angle corrections (P3-P7)
|
5113
|
|
- *
|
5114
|
|
- * V Verbose level:
|
|
5108
|
+ * T Don't calibrate tower angle corrections
|
|
5109
|
+ *
|
|
5110
|
+ * Cn.nn Calibration precision; when omitted calibrates to maximum precision
|
|
5111
|
+ *
|
|
5112
|
+ * Vn Verbose level:
|
5115
|
5113
|
*
|
5116
|
5114
|
* V0 Dry-run mode. Report settings and probe results. No calibration.
|
5117
|
5115
|
* V1 Report settings
|
|
@@ -5131,30 +5129,61 @@ void home_all_axes() { gcode_G28(true); }
|
5131
|
5129
|
return;
|
5132
|
5130
|
}
|
5133
|
5131
|
|
5134
|
|
- const bool do_height_only = probe_points == 1,
|
5135
|
|
- do_center_and_towers = probe_points == 2,
|
5136
|
|
- do_all_positions = probe_points == 3,
|
5137
|
|
- do_circle_x2 = probe_points == 5,
|
5138
|
|
- do_circle_x3 = probe_points == 6,
|
5139
|
|
- do_circle_x4 = probe_points == 7,
|
5140
|
|
- probe_center_plus_3 = probe_points >= 3,
|
5141
|
|
- point_averaging = probe_points >= 4,
|
5142
|
|
- probe_center_plus_6 = probe_points >= 5;
|
|
5132
|
+ const float calibration_precision = code_seen('C') ? code_value_float() : 0.0;
|
|
5133
|
+ if (calibration_precision < 0) {
|
|
5134
|
+ SERIAL_PROTOCOLLNPGM("?(C)alibration precision is implausible (>0).");
|
|
5135
|
+ return;
|
|
5136
|
+ }
|
5143
|
5137
|
|
5144
|
|
- const char negating_parameter = do_height_only ? 'A' : do_center_and_towers ? 'O' : 'T';
|
5145
|
|
- int8_t probe_mode = code_seen(negating_parameter) && code_value_bool() ? -probe_points : probe_points;
|
|
5138
|
+ const bool towers_set = !code_seen('T'),
|
|
5139
|
+
|
|
5140
|
+ _1p_calibration = probe_points == 1,
|
|
5141
|
+ _4p_calibration = probe_points == 2,
|
|
5142
|
+ _4p_towers_points = _4p_calibration && towers_set,
|
|
5143
|
+ _4p_opposite_points = _4p_calibration && !towers_set,
|
|
5144
|
+ _7p_calibration = probe_points >= 3,
|
|
5145
|
+ _7p_half_circle = probe_points == 3,
|
|
5146
|
+ _7p_double_circle = probe_points == 5,
|
|
5147
|
+ _7p_triple_circle = probe_points == 6,
|
|
5148
|
+ _7p_quadruple_circle = probe_points == 7,
|
|
5149
|
+ _7p_multi_circle = _7p_double_circle || _7p_triple_circle || _7p_quadruple_circle,
|
|
5150
|
+ _7p_intermed_points = _7p_calibration && !_7p_half_circle;
|
|
5151
|
+
|
|
5152
|
+ if (!_1p_calibration) { // test if the outer radius is reachable
|
|
5153
|
+ for (uint8_t axis = 1; axis < 13; ++axis) {
|
|
5154
|
+ float circles = (_7p_quadruple_circle ? 1.5 :
|
|
5155
|
+ _7p_triple_circle ? 1.0 :
|
|
5156
|
+ _7p_double_circle ? 0.5 : 0);
|
|
5157
|
+ if (!position_is_reachable_by_probe_xy(cos(RADIANS(180 + 30 * axis)) *
|
|
5158
|
+ delta_calibration_radius * (1 + circles * 0.1),
|
|
5159
|
+ sin(RADIANS(180 + 30 * axis)) *
|
|
5160
|
+ delta_calibration_radius * (1 + circles * 0.1))) {
|
|
5161
|
+ SERIAL_PROTOCOLLNPGM("?(M665 B)ed radius is implausible.");
|
|
5162
|
+ return;
|
|
5163
|
+ }
|
|
5164
|
+ }
|
|
5165
|
+ }
|
5146
|
5166
|
|
5147
|
5167
|
SERIAL_PROTOCOLLNPGM("G33 Auto Calibrate");
|
5148
|
5168
|
|
|
5169
|
+ stepper.synchronize();
|
5149
|
5170
|
#if HAS_LEVELING
|
5150
|
|
- set_bed_leveling_enabled(false);
|
|
5171
|
+ reset_bed_level(); // After calibration bed-level data is no longer valid
|
5151
|
5172
|
#endif
|
|
5173
|
+ #if HOTENDS > 1
|
|
5174
|
+ const uint8_t old_tool_index = active_extruder;
|
|
5175
|
+ tool_change(0, 0, true);
|
|
5176
|
+ #endif
|
|
5177
|
+ setup_for_endstop_or_probe_move();
|
5152
|
5178
|
|
5153
|
|
- home_all_axes();
|
|
5179
|
+ endstops.enable(true);
|
|
5180
|
+ home_delta();
|
|
5181
|
+ endstops.not_homing();
|
5154
|
5182
|
|
5155
|
5183
|
const static char save_message[] PROGMEM = "Save with M500 and/or copy to Configuration.h";
|
5156
|
5184
|
float test_precision,
|
5157
|
5185
|
zero_std_dev = (verbose_level ? 999.0 : 0.0), // 0.0 in dry-run mode : forced end
|
|
5186
|
+ zero_std_dev_old = zero_std_dev,
|
5158
|
5187
|
e_old[XYZ] = {
|
5159
|
5188
|
endstop_adj[A_AXIS],
|
5160
|
5189
|
endstop_adj[B_AXIS],
|
|
@@ -5173,7 +5202,7 @@ void home_all_axes() { gcode_G28(true); }
|
5173
|
5202
|
LCD_MESSAGEPGM("Checking... AC"); // TODO: Make translatable string
|
5174
|
5203
|
|
5175
|
5204
|
SERIAL_PROTOCOLPAIR(".Height:", DELTA_HEIGHT + home_offset[Z_AXIS]);
|
5176
|
|
- if (!do_height_only) {
|
|
5205
|
+ if (!_1p_calibration) {
|
5177
|
5206
|
SERIAL_PROTOCOLPGM(" Ex:");
|
5178
|
5207
|
if (endstop_adj[A_AXIS] >= 0) SERIAL_CHAR('+');
|
5179
|
5208
|
SERIAL_PROTOCOL_F(endstop_adj[A_AXIS], 2);
|
|
@@ -5186,7 +5215,7 @@ void home_all_axes() { gcode_G28(true); }
|
5186
|
5215
|
SERIAL_PROTOCOLPAIR(" Radius:", delta_radius);
|
5187
|
5216
|
}
|
5188
|
5217
|
SERIAL_EOL;
|
5189
|
|
- if (probe_mode > 2) { // negative disables tower angles
|
|
5218
|
+ if (_7p_calibration && towers_set) {
|
5190
|
5219
|
SERIAL_PROTOCOLPGM(".Tower angle : Tx:");
|
5191
|
5220
|
if (delta_tower_angle_trim[A_AXIS] >= 0) SERIAL_CHAR('+');
|
5192
|
5221
|
SERIAL_PROTOCOL_F(delta_tower_angle_trim[A_AXIS], 2);
|
|
@@ -5202,80 +5231,76 @@ void home_all_axes() { gcode_G28(true); }
|
5202
|
5231
|
#endif
|
5203
|
5232
|
|
5204
|
5233
|
int8_t iterations = 0;
|
|
5234
|
+
|
|
5235
|
+ home_offset[Z_AXIS] -= probe_pt(0.0, 0.0 , true, 1); // 1st probe to set height
|
|
5236
|
+ do_probe_raise(Z_CLEARANCE_BETWEEN_PROBES);
|
5205
|
5237
|
|
5206
|
5238
|
do {
|
5207
|
5239
|
|
5208
|
|
- float z_at_pt[13] = { 0 },
|
5209
|
|
- S1 = 0.0,
|
5210
|
|
- S2 = 0.0;
|
|
5240
|
+ float z_at_pt[13] = { 0.0 }, S1 = 0.0, S2 = 0.0;
|
5211
|
5241
|
int16_t N = 0;
|
5212
|
5242
|
|
5213
|
|
- test_precision = zero_std_dev;
|
|
5243
|
+ test_precision = zero_std_dev_old != 999.0 ? (zero_std_dev + zero_std_dev_old) / 2 : zero_std_dev;
|
|
5244
|
+
|
5214
|
5245
|
iterations++;
|
5215
|
5246
|
|
5216
|
5247
|
// Probe the points
|
5217
|
5248
|
|
5218
|
|
- if (!do_all_positions && !do_circle_x3) { // probe the center
|
5219
|
|
- setup_for_endstop_or_probe_move();
|
5220
|
|
- z_at_pt[0] += probe_pt(0.0, 0.0 , true, 1); // TODO: Needs error handling
|
5221
|
|
- clean_up_after_endstop_or_probe_move();
|
|
5249
|
+ if (!_7p_half_circle && !_7p_triple_circle) { // probe the center
|
|
5250
|
+ z_at_pt[0] += probe_pt(0.0, 0.0 , true, 1);
|
5222
|
5251
|
}
|
5223
|
|
- if (probe_center_plus_3) { // probe extra center points
|
5224
|
|
- for (int8_t axis = probe_center_plus_6 ? 11 : 9; axis > 0; axis -= probe_center_plus_6 ? 2 : 4) {
|
5225
|
|
- setup_for_endstop_or_probe_move();
|
5226
|
|
- z_at_pt[0] += probe_pt( // TODO: Needs error handling
|
5227
|
|
- cos(RADIANS(180 + 30 * axis)) * (0.1 * delta_calibration_radius),
|
5228
|
|
- sin(RADIANS(180 + 30 * axis)) * (0.1 * delta_calibration_radius), true, 1);
|
5229
|
|
- clean_up_after_endstop_or_probe_move();
|
|
5252
|
+ if (_7p_calibration) { // probe extra center points
|
|
5253
|
+ for (int8_t axis = _7p_multi_circle ? 11 : 9; axis > 0; axis -= _7p_multi_circle ? 2 : 4) {
|
|
5254
|
+ const float a = RADIANS(180 + 30 * axis), r = delta_calibration_radius * 0.1;
|
|
5255
|
+ z_at_pt[0] += probe_pt(cos(a) * r, sin(a) * r, true, 1); // TODO: Needs error handling
|
5230
|
5256
|
}
|
5231
|
|
- z_at_pt[0] /= float(do_circle_x2 ? 7 : probe_points);
|
|
5257
|
+ z_at_pt[0] /= float(_7p_double_circle ? 7 : probe_points);
|
5232
|
5258
|
}
|
5233
|
|
- if (!do_height_only) { // probe the radius
|
|
5259
|
+ if (!_1p_calibration) { // probe the radius
|
5234
|
5260
|
bool zig_zag = true;
|
5235
|
|
- for (uint8_t axis = (probe_mode == -2 ? 3 : 1); axis < 13;
|
5236
|
|
- axis += (do_center_and_towers ? 4 : do_all_positions ? 2 : 1)) {
|
5237
|
|
- float offset_circles = (do_circle_x4 ? (zig_zag ? 1.5 : 1.0) :
|
5238
|
|
- do_circle_x3 ? (zig_zag ? 1.0 : 0.5) :
|
5239
|
|
- do_circle_x2 ? (zig_zag ? 0.5 : 0.0) : 0);
|
|
5261
|
+ const uint8_t start = _4p_opposite_points ? 3 : 1,
|
|
5262
|
+ step = _4p_calibration ? 4 : _7p_half_circle ? 2 : 1;
|
|
5263
|
+ for (uint8_t axis = start; axis < 13; axis += step) {
|
|
5264
|
+ const float offset_circles = _7p_quadruple_circle ? (zig_zag ? 1.5 : 1.0) :
|
|
5265
|
+ _7p_triple_circle ? (zig_zag ? 1.0 : 0.5) :
|
|
5266
|
+ _7p_double_circle ? (zig_zag ? 0.5 : 0.0) : 0;
|
5240
|
5267
|
for (float circles = -offset_circles ; circles <= offset_circles; circles++) {
|
5241
|
|
- setup_for_endstop_or_probe_move();
|
5242
|
|
- z_at_pt[axis] += probe_pt( // TODO: Needs error handling
|
5243
|
|
- cos(RADIANS(180 + 30 * axis)) * delta_calibration_radius *
|
5244
|
|
- (1 + circles * 0.1 * (zig_zag ? 1 : -1)),
|
5245
|
|
- sin(RADIANS(180 + 30 * axis)) * delta_calibration_radius *
|
5246
|
|
- (1 + circles * 0.1 * (zig_zag ? 1 : -1)), true, 1);
|
5247
|
|
- clean_up_after_endstop_or_probe_move();
|
|
5268
|
+ const float a = RADIANS(180 + 30 * axis),
|
|
5269
|
+ r = delta_calibration_radius * (1 + circles * (zig_zag ? 0.1 : -0.1));
|
|
5270
|
+ z_at_pt[axis] += probe_pt(cos(a) * r, sin(a) * r, true, 1); // TODO: Needs error handling
|
5248
|
5271
|
}
|
5249
|
5272
|
zig_zag = !zig_zag;
|
5250
|
5273
|
z_at_pt[axis] /= (2 * offset_circles + 1);
|
5251
|
5274
|
}
|
5252
|
5275
|
}
|
5253
|
|
- if (point_averaging) // average intermediates to tower and opposites
|
|
5276
|
+ if (_7p_intermed_points) // average intermediates to tower and opposites
|
5254
|
5277
|
for (uint8_t axis = 1; axis <= 11; axis += 2)
|
5255
|
5278
|
z_at_pt[axis] = (z_at_pt[axis] + (z_at_pt[axis + 1] + z_at_pt[(axis + 10) % 12 + 1]) / 2.0) / 2.0;
|
5256
|
5279
|
|
5257
|
5280
|
S1 += z_at_pt[0];
|
5258
|
5281
|
S2 += sq(z_at_pt[0]);
|
5259
|
5282
|
N++;
|
5260
|
|
- if (!do_height_only) // std dev from zero plane
|
5261
|
|
- for (uint8_t axis = (probe_mode == -2 ? 3 : 1); axis < 13; axis += (do_center_and_towers ? 4 : 2)) {
|
|
5283
|
+ if (!_1p_calibration) // std dev from zero plane
|
|
5284
|
+ for (uint8_t axis = (_4p_opposite_points ? 3 : 1); axis < 13; axis += (_4p_calibration ? 4 : 2)) {
|
5262
|
5285
|
S1 += z_at_pt[axis];
|
5263
|
5286
|
S2 += sq(z_at_pt[axis]);
|
5264
|
5287
|
N++;
|
5265
|
5288
|
}
|
|
5289
|
+ zero_std_dev_old = zero_std_dev;
|
5266
|
5290
|
zero_std_dev = round(sqrt(S2 / N) * 1000.0) / 1000.0 + 0.00001;
|
|
5291
|
+
|
|
5292
|
+ if (iterations == 1) home_offset[Z_AXIS] = zh_old; // reset height after 1st probe change
|
5267
|
5293
|
|
5268
|
5294
|
// Solve matrices
|
5269
|
5295
|
|
5270
|
|
- if (zero_std_dev < test_precision) {
|
|
5296
|
+ if (zero_std_dev < test_precision && zero_std_dev > calibration_precision) {
|
5271
|
5297
|
COPY(e_old, endstop_adj);
|
5272
|
5298
|
dr_old = delta_radius;
|
5273
|
5299
|
zh_old = home_offset[Z_AXIS];
|
5274
|
5300
|
alpha_old = delta_tower_angle_trim[A_AXIS];
|
5275
|
5301
|
beta_old = delta_tower_angle_trim[B_AXIS];
|
5276
|
5302
|
|
5277
|
|
- float e_delta[XYZ] = { 0.0 }, r_delta = 0.0,
|
5278
|
|
- t_alpha = 0.0, t_beta = 0.0;
|
|
5303
|
+ float e_delta[XYZ] = { 0.0 }, r_delta = 0.0, t_alpha = 0.0, t_beta = 0.0;
|
5279
|
5304
|
const float r_diff = delta_radius - delta_calibration_radius,
|
5280
|
5305
|
h_factor = 1.00 + r_diff * 0.001, //1.02 for r_diff = 20mm
|
5281
|
5306
|
r_factor = -(1.75 + 0.005 * r_diff + 0.001 * sq(r_diff)), //2.25 for r_diff = 20mm
|
|
@@ -5293,25 +5318,25 @@ void home_all_axes() { gcode_G28(true); }
|
5293
|
5318
|
#define Z0444(I) ZP(a_factor * 4.0 / 9.0, I)
|
5294
|
5319
|
#define Z0888(I) ZP(a_factor * 8.0 / 9.0, I)
|
5295
|
5320
|
|
5296
|
|
- switch (probe_mode) {
|
5297
|
|
- case -1:
|
5298
|
|
- test_precision = 0.00;
|
|
5321
|
+ switch (probe_points) {
|
5299
|
5322
|
case 1:
|
|
5323
|
+ test_precision = 0.00;
|
5300
|
5324
|
LOOP_XYZ(i) e_delta[i] = Z1000(0);
|
5301
|
5325
|
break;
|
5302
|
5326
|
|
5303
|
5327
|
case 2:
|
5304
|
|
- e_delta[X_AXIS] = Z1050(0) + Z0700(1) - Z0350(5) - Z0350(9);
|
5305
|
|
- e_delta[Y_AXIS] = Z1050(0) - Z0350(1) + Z0700(5) - Z0350(9);
|
5306
|
|
- e_delta[Z_AXIS] = Z1050(0) - Z0350(1) - Z0350(5) + Z0700(9);
|
5307
|
|
- r_delta = Z2250(0) - Z0750(1) - Z0750(5) - Z0750(9);
|
5308
|
|
- break;
|
5309
|
|
-
|
5310
|
|
- case -2:
|
5311
|
|
- e_delta[X_AXIS] = Z1050(0) - Z0700(7) + Z0350(11) + Z0350(3);
|
5312
|
|
- e_delta[Y_AXIS] = Z1050(0) + Z0350(7) - Z0700(11) + Z0350(3);
|
5313
|
|
- e_delta[Z_AXIS] = Z1050(0) + Z0350(7) + Z0350(11) - Z0700(3);
|
5314
|
|
- r_delta = Z2250(0) - Z0750(7) - Z0750(11) - Z0750(3);
|
|
5328
|
+ if (towers_set) {
|
|
5329
|
+ e_delta[X_AXIS] = Z1050(0) + Z0700(1) - Z0350(5) - Z0350(9);
|
|
5330
|
+ e_delta[Y_AXIS] = Z1050(0) - Z0350(1) + Z0700(5) - Z0350(9);
|
|
5331
|
+ e_delta[Z_AXIS] = Z1050(0) - Z0350(1) - Z0350(5) + Z0700(9);
|
|
5332
|
+ r_delta = Z2250(0) - Z0750(1) - Z0750(5) - Z0750(9);
|
|
5333
|
+ }
|
|
5334
|
+ else {
|
|
5335
|
+ e_delta[X_AXIS] = Z1050(0) - Z0700(7) + Z0350(11) + Z0350(3);
|
|
5336
|
+ e_delta[Y_AXIS] = Z1050(0) + Z0350(7) - Z0700(11) + Z0350(3);
|
|
5337
|
+ e_delta[Z_AXIS] = Z1050(0) + Z0350(7) + Z0350(11) - Z0700(3);
|
|
5338
|
+ r_delta = Z2250(0) - Z0750(7) - Z0750(11) - Z0750(3);
|
|
5339
|
+ }
|
5315
|
5340
|
break;
|
5316
|
5341
|
|
5317
|
5342
|
default:
|
|
@@ -5320,9 +5345,9 @@ void home_all_axes() { gcode_G28(true); }
|
5320
|
5345
|
e_delta[Z_AXIS] = Z1050(0) - Z0175(1) - Z0175(5) + Z0350(9) + Z0175(7) + Z0175(11) - Z0350(3);
|
5321
|
5346
|
r_delta = Z2250(0) - Z0375(1) - Z0375(5) - Z0375(9) - Z0375(7) - Z0375(11) - Z0375(3);
|
5322
|
5347
|
|
5323
|
|
- if (probe_mode > 0) { // negative disables tower angles
|
5324
|
|
- t_alpha = + Z0444(1) - Z0888(5) + Z0444(9) + Z0444(7) - Z0888(11) + Z0444(3);
|
5325
|
|
- t_beta = - Z0888(1) + Z0444(5) + Z0444(9) - Z0888(7) + Z0444(11) + Z0444(3);
|
|
5348
|
+ if (towers_set) {
|
|
5349
|
+ t_alpha = Z0444(1) - Z0888(5) + Z0444(9) + Z0444(7) - Z0888(11) + Z0444(3);
|
|
5350
|
+ t_beta = Z0888(1) - Z0444(5) - Z0444(9) + Z0888(7) - Z0444(11) - Z0444(3);
|
5326
|
5351
|
}
|
5327
|
5352
|
break;
|
5328
|
5353
|
}
|
|
@@ -5330,7 +5355,7 @@ void home_all_axes() { gcode_G28(true); }
|
5330
|
5355
|
LOOP_XYZ(axis) endstop_adj[axis] += e_delta[axis];
|
5331
|
5356
|
delta_radius += r_delta;
|
5332
|
5357
|
delta_tower_angle_trim[A_AXIS] += t_alpha;
|
5333
|
|
- delta_tower_angle_trim[B_AXIS] -= t_beta;
|
|
5358
|
+ delta_tower_angle_trim[B_AXIS] += t_beta;
|
5334
|
5359
|
|
5335
|
5360
|
// adjust delta_height and endstops by the max amount
|
5336
|
5361
|
const float z_temp = MAX3(endstop_adj[A_AXIS], endstop_adj[B_AXIS], endstop_adj[C_AXIS]);
|
|
@@ -5339,7 +5364,7 @@ void home_all_axes() { gcode_G28(true); }
|
5339
|
5364
|
|
5340
|
5365
|
recalc_delta_settings(delta_radius, delta_diagonal_rod);
|
5341
|
5366
|
}
|
5342
|
|
- else { // step one back
|
|
5367
|
+ else if(zero_std_dev >= test_precision) { // step one back
|
5343
|
5368
|
COPY(endstop_adj, e_old);
|
5344
|
5369
|
delta_radius = dr_old;
|
5345
|
5370
|
home_offset[Z_AXIS] = zh_old;
|
|
@@ -5355,7 +5380,7 @@ void home_all_axes() { gcode_G28(true); }
|
5355
|
5380
|
SERIAL_PROTOCOLPGM(". c:");
|
5356
|
5381
|
if (z_at_pt[0] > 0) SERIAL_CHAR('+');
|
5357
|
5382
|
SERIAL_PROTOCOL_F(z_at_pt[0], 2);
|
5358
|
|
- if (probe_mode == 2 || probe_center_plus_3) {
|
|
5383
|
+ if (_4p_towers_points || _7p_calibration) {
|
5359
|
5384
|
SERIAL_PROTOCOLPGM(" x:");
|
5360
|
5385
|
if (z_at_pt[1] >= 0) SERIAL_CHAR('+');
|
5361
|
5386
|
SERIAL_PROTOCOL_F(z_at_pt[1], 2);
|
|
@@ -5366,9 +5391,9 @@ void home_all_axes() { gcode_G28(true); }
|
5366
|
5391
|
if (z_at_pt[9] >= 0) SERIAL_CHAR('+');
|
5367
|
5392
|
SERIAL_PROTOCOL_F(z_at_pt[9], 2);
|
5368
|
5393
|
}
|
5369
|
|
- if (probe_mode != -2) SERIAL_EOL;
|
5370
|
|
- if (probe_mode == -2 || probe_center_plus_3) {
|
5371
|
|
- if (probe_center_plus_3) {
|
|
5394
|
+ if (!_4p_opposite_points) SERIAL_EOL;
|
|
5395
|
+ if ((_4p_opposite_points) || _7p_calibration) {
|
|
5396
|
+ if (_7p_calibration) {
|
5372
|
5397
|
SERIAL_CHAR('.');
|
5373
|
5398
|
SERIAL_PROTOCOL_SP(13);
|
5374
|
5399
|
}
|
|
@@ -5385,10 +5410,15 @@ void home_all_axes() { gcode_G28(true); }
|
5385
|
5410
|
}
|
5386
|
5411
|
}
|
5387
|
5412
|
if (test_precision != 0.0) { // !forced end
|
5388
|
|
- if (zero_std_dev >= test_precision) { // end iterations
|
|
5413
|
+ if (zero_std_dev >= test_precision || zero_std_dev <= calibration_precision) { // end iterations
|
5389
|
5414
|
SERIAL_PROTOCOLPGM("Calibration OK");
|
5390
|
5415
|
SERIAL_PROTOCOL_SP(36);
|
5391
|
|
- SERIAL_PROTOCOLPGM("rolling back.");
|
|
5416
|
+ if (zero_std_dev >= test_precision)
|
|
5417
|
+ SERIAL_PROTOCOLPGM("rolling back.");
|
|
5418
|
+ else {
|
|
5419
|
+ SERIAL_PROTOCOLPGM("std dev:");
|
|
5420
|
+ SERIAL_PROTOCOL_F(zero_std_dev, 3);
|
|
5421
|
+ }
|
5392
|
5422
|
SERIAL_EOL;
|
5393
|
5423
|
LCD_MESSAGEPGM("Calibration OK"); // TODO: Make translatable string
|
5394
|
5424
|
}
|
|
@@ -5404,7 +5434,7 @@ void home_all_axes() { gcode_G28(true); }
|
5404
|
5434
|
lcd_setstatus(mess);
|
5405
|
5435
|
}
|
5406
|
5436
|
SERIAL_PROTOCOLPAIR(".Height:", DELTA_HEIGHT + home_offset[Z_AXIS]);
|
5407
|
|
- if (!do_height_only) {
|
|
5437
|
+ if (!_1p_calibration) {
|
5408
|
5438
|
SERIAL_PROTOCOLPGM(" Ex:");
|
5409
|
5439
|
if (endstop_adj[A_AXIS] >= 0) SERIAL_CHAR('+');
|
5410
|
5440
|
SERIAL_PROTOCOL_F(endstop_adj[A_AXIS], 2);
|
|
@@ -5417,7 +5447,7 @@ void home_all_axes() { gcode_G28(true); }
|
5417
|
5447
|
SERIAL_PROTOCOLPAIR(" Radius:", delta_radius);
|
5418
|
5448
|
}
|
5419
|
5449
|
SERIAL_EOL;
|
5420
|
|
- if (probe_mode > 2) { // negative disables tower angles
|
|
5450
|
+ if (_7p_calibration && towers_set) {
|
5421
|
5451
|
SERIAL_PROTOCOLPGM(".Tower angle : Tx:");
|
5422
|
5452
|
if (delta_tower_angle_trim[A_AXIS] >= 0) SERIAL_CHAR('+');
|
5423
|
5453
|
SERIAL_PROTOCOL_F(delta_tower_angle_trim[A_AXIS], 2);
|
|
@@ -5427,7 +5457,7 @@ void home_all_axes() { gcode_G28(true); }
|
5427
|
5457
|
SERIAL_PROTOCOLPGM(" Tz:+0.00");
|
5428
|
5458
|
SERIAL_EOL;
|
5429
|
5459
|
}
|
5430
|
|
- if (zero_std_dev >= test_precision)
|
|
5460
|
+ if (zero_std_dev >= test_precision || zero_std_dev <= calibration_precision)
|
5431
|
5461
|
serialprintPGM(save_message);
|
5432
|
5462
|
SERIAL_EOL;
|
5433
|
5463
|
}
|
|
@@ -5449,12 +5479,20 @@ void home_all_axes() { gcode_G28(true); }
|
5449
|
5479
|
}
|
5450
|
5480
|
}
|
5451
|
5481
|
|
5452
|
|
- stepper.synchronize();
|
5453
|
|
-
|
5454
|
|
- home_all_axes();
|
|
5482
|
+ endstops.enable(true);
|
|
5483
|
+ home_delta();
|
|
5484
|
+ endstops.not_homing();
|
5455
|
5485
|
|
5456
|
|
- } while (zero_std_dev < test_precision && iterations < 31);
|
|
5486
|
+ }
|
|
5487
|
+ while (zero_std_dev < test_precision && zero_std_dev > calibration_precision && iterations < 31);
|
5457
|
5488
|
|
|
5489
|
+ #if ENABLED(DELTA_HOME_TO_SAFE_ZONE)
|
|
5490
|
+ do_blocking_move_to_z(delta_clip_start_height);
|
|
5491
|
+ #endif
|
|
5492
|
+ clean_up_after_endstop_or_probe_move();
|
|
5493
|
+ #if HOTENDS > 1
|
|
5494
|
+ tool_change(old_tool_index, 0, true);
|
|
5495
|
+ #endif
|
5458
|
5496
|
#if ENABLED(Z_PROBE_SLED)
|
5459
|
5497
|
RETRACT_PROBE();
|
5460
|
5498
|
#endif
|