|
@@ -5127,6 +5127,10 @@ void home_all_axes() { gcode_G28(true); }
|
5127
|
5127
|
|
5128
|
5128
|
#endif // Z_PROBE_SLED
|
5129
|
5129
|
|
|
5130
|
+#endif // HAS_BED_PROBE
|
|
5131
|
+
|
|
5132
|
+#if PROBE_SELECTED
|
|
5133
|
+
|
5130
|
5134
|
#if ENABLED(DELTA_AUTO_CALIBRATION)
|
5131
|
5135
|
/**
|
5132
|
5136
|
* G33 - Delta '1-4-7-point' Auto-Calibration
|
|
@@ -5184,9 +5188,9 @@ void home_all_axes() { gcode_G28(true); }
|
5184
|
5188
|
return;
|
5185
|
5189
|
}
|
5186
|
5190
|
|
5187
|
|
- const int8_t force_iterations = parser.intval('F', 1);
|
5188
|
|
- if (!WITHIN(force_iterations, 1, 30)) {
|
5189
|
|
- SERIAL_PROTOCOLLNPGM("?(F)orce iteration is implausible (1-30).");
|
|
5191
|
+ const int8_t force_iterations = parser.intval('F', 0);
|
|
5192
|
+ if (!WITHIN(force_iterations, 0, 30)) {
|
|
5193
|
+ SERIAL_PROTOCOLLNPGM("?(F)orce iteration is implausible (0-30).");
|
5190
|
5194
|
return;
|
5191
|
5195
|
}
|
5192
|
5196
|
|
|
@@ -5221,7 +5225,7 @@ void home_all_axes() { gcode_G28(true); }
|
5221
|
5225
|
alpha_old = delta_tower_angle_trim[A_AXIS],
|
5222
|
5226
|
beta_old = delta_tower_angle_trim[B_AXIS];
|
5223
|
5227
|
|
5224
|
|
- if (!_1p_calibration) { // test if the outer radius is reachable
|
|
5228
|
+ if (!_1p_calibration) { // test if the outer radius is reachable
|
5225
|
5229
|
const float circles = (_7p_quadruple_circle ? 1.5 :
|
5226
|
5230
|
_7p_triple_circle ? 1.0 :
|
5227
|
5231
|
_7p_double_circle ? 0.5 : 0),
|
|
@@ -5273,7 +5277,9 @@ void home_all_axes() { gcode_G28(true); }
|
5273
|
5277
|
SERIAL_EOL();
|
5274
|
5278
|
}
|
5275
|
5279
|
|
5276
|
|
- home_offset[Z_AXIS] -= probe_pt(dx, dy, stow_after_each, 1, false); // 1st probe to set height
|
|
5280
|
+ #if DISABLED(PROBE_MANUALLY)
|
|
5281
|
+ home_offset[Z_AXIS] -= probe_pt(dx, dy, stow_after_each, 1, false); // 1st probe to set height
|
|
5282
|
+ #endif
|
5277
|
5283
|
|
5278
|
5284
|
do {
|
5279
|
5285
|
|
|
@@ -5286,12 +5292,20 @@ void home_all_axes() { gcode_G28(true); }
|
5286
|
5292
|
// Probe the points
|
5287
|
5293
|
|
5288
|
5294
|
if (!_7p_half_circle && !_7p_triple_circle) { // probe the center
|
5289
|
|
- z_at_pt[0] += probe_pt(dx, dy, stow_after_each, 1, false);
|
|
5295
|
+ #if ENABLED(PROBE_MANUALLY)
|
|
5296
|
+ z_at_pt[0] += lcd_probe_pt(0, 0);
|
|
5297
|
+ #else
|
|
5298
|
+ z_at_pt[0] += probe_pt(dx, dy, stow_after_each, 1, false);
|
|
5299
|
+ #endif
|
5290
|
5300
|
}
|
5291
|
5301
|
if (_7p_calibration) { // probe extra center points
|
5292
|
5302
|
for (int8_t axis = _7p_multi_circle ? 11 : 9; axis > 0; axis -= _7p_multi_circle ? 2 : 4) {
|
5293
|
5303
|
const float a = RADIANS(180 + 30 * axis), r = delta_calibration_radius * 0.1;
|
5294
|
|
- z_at_pt[0] += probe_pt(cos(a) * r + dx, sin(a) * r + dy, stow_after_each, 1, false);
|
|
5304
|
+ #if ENABLED(PROBE_MANUALLY)
|
|
5305
|
+ z_at_pt[0] += lcd_probe_pt(cos(a) * r, sin(a) * r);
|
|
5306
|
+ #else
|
|
5307
|
+ z_at_pt[0] += probe_pt(cos(a) * r + dx, sin(a) * r + dy, stow_after_each, 1, false);
|
|
5308
|
+ #endif
|
5295
|
5309
|
}
|
5296
|
5310
|
z_at_pt[0] /= float(_7p_double_circle ? 7 : probe_points);
|
5297
|
5311
|
}
|
|
@@ -5307,7 +5321,11 @@ void home_all_axes() { gcode_G28(true); }
|
5307
|
5321
|
for (float circles = -offset_circles ; circles <= offset_circles; circles++) {
|
5308
|
5322
|
const float a = RADIANS(180 + 30 * axis),
|
5309
|
5323
|
r = delta_calibration_radius * (1 + circles * (zig_zag ? 0.1 : -0.1));
|
5310
|
|
- z_at_pt[axis] += probe_pt(cos(a) * r + dx, sin(a) * r + dy, stow_after_each, 1, false);
|
|
5324
|
+ #if ENABLED(PROBE_MANUALLY)
|
|
5325
|
+ z_at_pt[axis] += lcd_probe_pt(cos(a) * r, sin(a) * r);
|
|
5326
|
+ #else
|
|
5327
|
+ z_at_pt[axis] += probe_pt(cos(a) * r + dx, sin(a) * r + dy, stow_after_each, 1, false);
|
|
5328
|
+ #endif
|
5311
|
5329
|
}
|
5312
|
5330
|
zig_zag = !zig_zag;
|
5313
|
5331
|
z_at_pt[axis] /= (2 * offset_circles + 1);
|
|
@@ -5359,9 +5377,13 @@ void home_all_axes() { gcode_G28(true); }
|
5359
|
5377
|
#define Z0444(I) ZP(a_factor * 4.0 / 9.0, I)
|
5360
|
5378
|
#define Z0888(I) ZP(a_factor * 8.0 / 9.0, I)
|
5361
|
5379
|
|
|
5380
|
+ #if ENABLED(PROBE_MANUALLY)
|
|
5381
|
+ test_precision = 0.00; // forced end
|
|
5382
|
+ #endif
|
|
5383
|
+
|
5362
|
5384
|
switch (probe_points) {
|
5363
|
5385
|
case 1:
|
5364
|
|
- test_precision = 0.00;
|
|
5386
|
+ test_precision = 0.00; // forced end
|
5365
|
5387
|
LOOP_XYZ(i) e_delta[i] = Z1000(0);
|
5366
|
5388
|
break;
|
5367
|
5389
|
|
|
@@ -5437,16 +5459,19 @@ void home_all_axes() { gcode_G28(true); }
|
5437
|
5459
|
SERIAL_EOL();
|
5438
|
5460
|
}
|
5439
|
5461
|
}
|
5440
|
|
- if (test_precision != 0.0) { // !forced end
|
|
5462
|
+ if (verbose_level != 0) { // !dry run
|
5441
|
5463
|
if ((zero_std_dev >= test_precision || zero_std_dev <= calibration_precision) && iterations > force_iterations) { // end iterations
|
5442
|
5464
|
SERIAL_PROTOCOLPGM("Calibration OK");
|
5443
|
5465
|
SERIAL_PROTOCOL_SP(36);
|
5444
|
|
- if (zero_std_dev >= test_precision)
|
5445
|
|
- SERIAL_PROTOCOLPGM("rolling back.");
|
5446
|
|
- else {
|
5447
|
|
- SERIAL_PROTOCOLPGM("std dev:");
|
5448
|
|
- SERIAL_PROTOCOL_F(zero_std_dev, 3);
|
5449
|
|
- }
|
|
5466
|
+ #if DISABLED(PROBE_MANUALLY)
|
|
5467
|
+ if (zero_std_dev >= test_precision && !_1p_calibration)
|
|
5468
|
+ SERIAL_PROTOCOLPGM("rolling back.");
|
|
5469
|
+ else
|
|
5470
|
+ #endif
|
|
5471
|
+ {
|
|
5472
|
+ SERIAL_PROTOCOLPGM("std dev:");
|
|
5473
|
+ SERIAL_PROTOCOL_F(zero_std_dev, 3);
|
|
5474
|
+ }
|
5450
|
5475
|
SERIAL_EOL();
|
5451
|
5476
|
LCD_MESSAGEPGM("Calibration OK"); // TODO: Make translatable string
|
5452
|
5477
|
}
|
|
@@ -5480,22 +5505,12 @@ void home_all_axes() { gcode_G28(true); }
|
5480
|
5505
|
serialprintPGM(save_message);
|
5481
|
5506
|
SERIAL_EOL();
|
5482
|
5507
|
}
|
5483
|
|
- else { // forced end
|
5484
|
|
- if (verbose_level == 0) {
|
5485
|
|
- SERIAL_PROTOCOLPGM("End DRY-RUN");
|
5486
|
|
- SERIAL_PROTOCOL_SP(39);
|
5487
|
|
- SERIAL_PROTOCOLPGM("std dev:");
|
5488
|
|
- SERIAL_PROTOCOL_F(zero_std_dev, 3);
|
5489
|
|
- SERIAL_EOL();
|
5490
|
|
- }
|
5491
|
|
- else {
|
5492
|
|
- SERIAL_PROTOCOLLNPGM("Calibration OK");
|
5493
|
|
- LCD_MESSAGEPGM("Calibration OK"); // TODO: Make translatable string
|
5494
|
|
- SERIAL_PROTOCOLPAIR(".Height:", DELTA_HEIGHT + home_offset[Z_AXIS]);
|
5495
|
|
- SERIAL_EOL();
|
5496
|
|
- serialprintPGM(save_message);
|
5497
|
|
- SERIAL_EOL();
|
5498
|
|
- }
|
|
5508
|
+ else { // dry run
|
|
5509
|
+ SERIAL_PROTOCOLPGM("End DRY-RUN");
|
|
5510
|
+ SERIAL_PROTOCOL_SP(39);
|
|
5511
|
+ SERIAL_PROTOCOLPGM("std dev:");
|
|
5512
|
+ SERIAL_PROTOCOL_F(zero_std_dev, 3);
|
|
5513
|
+ SERIAL_EOL();
|
5499
|
5514
|
}
|
5500
|
5515
|
|
5501
|
5516
|
endstops.enable(true);
|
|
@@ -5517,7 +5532,7 @@ void home_all_axes() { gcode_G28(true); }
|
5517
|
5532
|
|
5518
|
5533
|
#endif // DELTA_AUTO_CALIBRATION
|
5519
|
5534
|
|
5520
|
|
-#endif // HAS_BED_PROBE
|
|
5535
|
+#endif // PROBE_SELECTED
|
5521
|
5536
|
|
5522
|
5537
|
#if ENABLED(G38_PROBE_TARGET)
|
5523
|
5538
|
|
|
@@ -10493,6 +10508,10 @@ void process_next_command() {
|
10493
|
10508
|
|
10494
|
10509
|
#endif // Z_PROBE_SLED
|
10495
|
10510
|
|
|
10511
|
+ #endif // HAS_BED_PROBE
|
|
10512
|
+
|
|
10513
|
+ #if PROBE_SELECTED
|
|
10514
|
+
|
10496
|
10515
|
#if ENABLED(DELTA_AUTO_CALIBRATION)
|
10497
|
10516
|
|
10498
|
10517
|
case 33: // G33: Delta Auto-Calibration
|
|
@@ -10501,7 +10520,7 @@ void process_next_command() {
|
10501
|
10520
|
|
10502
|
10521
|
#endif // DELTA_AUTO_CALIBRATION
|
10503
|
10522
|
|
10504
|
|
- #endif // HAS_BED_PROBE
|
|
10523
|
+ #endif // PROBE_SELECTED
|
10505
|
10524
|
|
10506
|
10525
|
#if ENABLED(G38_PROBE_TARGET)
|
10507
|
10526
|
case 38: // G38.2 & G38.3
|