|
@@ -610,11 +610,11 @@ static uint8_t target_extruder;
|
610
|
610
|
|
611
|
611
|
#if ENABLED(DELTA)
|
612
|
612
|
|
613
|
|
- float delta[ABC],
|
614
|
|
- endstop_adj[ABC] = { 0 };
|
|
613
|
+ float delta[ABC];
|
615
|
614
|
|
616
|
615
|
// Initialized by settings.load()
|
617
|
|
- float delta_radius,
|
|
616
|
+ float delta_endstop_adj[ABC] = { 0 },
|
|
617
|
+ delta_radius,
|
618
|
618
|
delta_tower_angle_trim[ABC],
|
619
|
619
|
delta_tower[ABC][2],
|
620
|
620
|
delta_diagonal_rod,
|
|
@@ -3093,12 +3093,12 @@ static void homeaxis(const AxisEnum axis) {
|
3093
|
3093
|
// so here it re-homes each tower in turn.
|
3094
|
3094
|
// Delta homing treats the axes as normal linear axes.
|
3095
|
3095
|
|
3096
|
|
- // retrace by the amount specified in endstop_adj + additional 0.1mm in order to have minimum steps
|
3097
|
|
- if (endstop_adj[axis] * Z_HOME_DIR <= 0) {
|
|
3096
|
+ // retrace by the amount specified in delta_endstop_adj + additional 0.1mm in order to have minimum steps
|
|
3097
|
+ if (delta_endstop_adj[axis] * Z_HOME_DIR <= 0) {
|
3098
|
3098
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
3099
|
|
- if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("endstop_adj:");
|
|
3099
|
+ if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("delta_endstop_adj:");
|
3100
|
3100
|
#endif
|
3101
|
|
- do_homing_move(axis, endstop_adj[axis] - 0.1 * Z_HOME_DIR);
|
|
3101
|
+ do_homing_move(axis, delta_endstop_adj[axis] - 0.1 * Z_HOME_DIR);
|
3102
|
3102
|
}
|
3103
|
3103
|
|
3104
|
3104
|
#else
|
|
@@ -5339,36 +5339,8 @@ void home_all_axes() { gcode_G28(true); }
|
5339
|
5339
|
#if PROBE_SELECTED
|
5340
|
5340
|
|
5341
|
5341
|
#if ENABLED(DELTA_AUTO_CALIBRATION)
|
5342
|
|
- /**
|
5343
|
|
- * G33 - Delta '1-4-7-point' Auto-Calibration
|
5344
|
|
- * Calibrate height, endstops, delta radius, and tower angles.
|
5345
|
|
- *
|
5346
|
|
- * Parameters:
|
5347
|
|
- *
|
5348
|
|
- * Pn Number of probe points:
|
5349
|
|
- *
|
5350
|
|
- * P0 No probe. Normalize only.
|
5351
|
|
- * P1 Probe center and set height only.
|
5352
|
|
- * P2 Probe center and towers. Set height, endstops, and delta radius.
|
5353
|
|
- * P3 Probe all positions: center, towers and opposite towers. Set all.
|
5354
|
|
- * P4-P7 Probe all positions at different locations and average them.
|
5355
|
|
- *
|
5356
|
|
- * T0 Don't calibrate tower angle corrections
|
5357
|
|
- *
|
5358
|
|
- * Cn.nn Calibration precision; when omitted calibrates to maximum precision
|
5359
|
|
- *
|
5360
|
|
- * Fn Force to run at least n iterations and takes the best result
|
5361
|
|
- *
|
5362
|
|
- * Vn Verbose level:
|
5363
|
|
- *
|
5364
|
|
- * V0 Dry-run mode. Report settings and probe results. No calibration.
|
5365
|
|
- * V1 Report settings
|
5366
|
|
- * V2 Report settings and probe results
|
5367
|
|
- *
|
5368
|
|
- * E Engage the probe for each point
|
5369
|
|
- */
|
5370
|
5342
|
|
5371
|
|
- void print_signed_float(const char * const prefix, const float &f) {
|
|
5343
|
+ static void print_signed_float(const char * const prefix, const float &f) {
|
5372
|
5344
|
SERIAL_PROTOCOLPGM(" ");
|
5373
|
5345
|
serialprintPGM(prefix);
|
5374
|
5346
|
SERIAL_PROTOCOLCHAR(':');
|
|
@@ -5376,25 +5348,59 @@ void home_all_axes() { gcode_G28(true); }
|
5376
|
5348
|
SERIAL_PROTOCOL_F(f, 2);
|
5377
|
5349
|
}
|
5378
|
5350
|
|
5379
|
|
- void print_G33_settings(const bool end_stops, const bool tower_angles) {
|
|
5351
|
+ static void print_G33_settings(const bool end_stops, const bool tower_angles) {
|
5380
|
5352
|
SERIAL_PROTOCOLPAIR(".Height:", DELTA_HEIGHT + home_offset[Z_AXIS]);
|
5381
|
5353
|
if (end_stops) {
|
5382
|
|
- print_signed_float(PSTR(" Ex"), endstop_adj[A_AXIS]);
|
5383
|
|
- print_signed_float(PSTR("Ey"), endstop_adj[B_AXIS]);
|
5384
|
|
- print_signed_float(PSTR("Ez"), endstop_adj[C_AXIS]);
|
5385
|
|
- SERIAL_PROTOCOLPAIR(" Radius:", delta_radius);
|
|
5354
|
+ print_signed_float(PSTR("Ex"), delta_endstop_adj[A_AXIS]);
|
|
5355
|
+ print_signed_float(PSTR("Ey"), delta_endstop_adj[B_AXIS]);
|
|
5356
|
+ print_signed_float(PSTR("Ez"), delta_endstop_adj[C_AXIS]);
|
|
5357
|
+ }
|
|
5358
|
+ if (end_stops && tower_angles) {
|
|
5359
|
+ SERIAL_PROTOCOLPAIR(" Radius:", delta_radius);
|
|
5360
|
+ SERIAL_EOL();
|
|
5361
|
+ SERIAL_CHAR('.');
|
|
5362
|
+ SERIAL_PROTOCOL_SP(13);
|
5386
|
5363
|
}
|
5387
|
|
- SERIAL_EOL();
|
5388
|
5364
|
if (tower_angles) {
|
5389
|
|
- SERIAL_PROTOCOLPGM(".Tower angle : ");
|
5390
|
5365
|
print_signed_float(PSTR("Tx"), delta_tower_angle_trim[A_AXIS]);
|
5391
|
5366
|
print_signed_float(PSTR("Ty"), delta_tower_angle_trim[B_AXIS]);
|
5392
|
5367
|
print_signed_float(PSTR("Tz"), delta_tower_angle_trim[C_AXIS]);
|
|
5368
|
+ }
|
|
5369
|
+ if ((!end_stops && tower_angles) || (end_stops && !tower_angles)) { // XOR
|
|
5370
|
+ SERIAL_PROTOCOLPAIR(" Radius:", delta_radius);
|
|
5371
|
+ }
|
|
5372
|
+ SERIAL_EOL();
|
|
5373
|
+ }
|
|
5374
|
+
|
|
5375
|
+ static void print_G33_results(const float z_at_pt[13], const bool tower_points, const bool opposite_points) {
|
|
5376
|
+ SERIAL_PROTOCOLPGM(". ");
|
|
5377
|
+ print_signed_float(PSTR("c"), z_at_pt[0]);
|
|
5378
|
+ if (tower_points) {
|
|
5379
|
+ print_signed_float(PSTR(" x"), z_at_pt[1]);
|
|
5380
|
+ print_signed_float(PSTR(" y"), z_at_pt[5]);
|
|
5381
|
+ print_signed_float(PSTR(" z"), z_at_pt[9]);
|
|
5382
|
+ }
|
|
5383
|
+ if (tower_points && opposite_points) {
|
5393
|
5384
|
SERIAL_EOL();
|
|
5385
|
+ SERIAL_CHAR('.');
|
|
5386
|
+ SERIAL_PROTOCOL_SP(13);
|
|
5387
|
+ }
|
|
5388
|
+ if (opposite_points) {
|
|
5389
|
+ print_signed_float(PSTR("yz"), z_at_pt[7]);
|
|
5390
|
+ print_signed_float(PSTR("zx"), z_at_pt[11]);
|
|
5391
|
+ print_signed_float(PSTR("xy"), z_at_pt[3]);
|
5394
|
5392
|
}
|
|
5393
|
+ SERIAL_EOL();
|
5395
|
5394
|
}
|
5396
|
5395
|
|
5397
|
|
- void G33_cleanup(
|
|
5396
|
+ /**
|
|
5397
|
+ * After G33:
|
|
5398
|
+ * - Move to the print ceiling (DELTA_HOME_TO_SAFE_ZONE only)
|
|
5399
|
+ * - Stow the probe
|
|
5400
|
+ * - Restore endstops state
|
|
5401
|
+ * - Select the old tool, if needed
|
|
5402
|
+ */
|
|
5403
|
+ static void G33_cleanup(
|
5398
|
5404
|
#if HOTENDS > 1
|
5399
|
5405
|
const uint8_t old_tool_index
|
5400
|
5406
|
#endif
|
|
@@ -5409,6 +5415,244 @@ void home_all_axes() { gcode_G28(true); }
|
5409
|
5415
|
#endif
|
5410
|
5416
|
}
|
5411
|
5417
|
|
|
5418
|
+ static float probe_G33_points(float z_at_pt[13], const int8_t probe_points, const bool towers_set, const bool stow_after_each) {
|
|
5419
|
+ const bool _0p_calibration = probe_points == 0,
|
|
5420
|
+ _1p_calibration = probe_points == 1,
|
|
5421
|
+ _4p_calibration = probe_points == 2,
|
|
5422
|
+ _4p_opposite_points = _4p_calibration && !towers_set,
|
|
5423
|
+ _7p_calibration = probe_points >= 3 || probe_points == 0,
|
|
5424
|
+ _7p_half_circle = probe_points == 3,
|
|
5425
|
+ _7p_double_circle = probe_points == 5,
|
|
5426
|
+ _7p_triple_circle = probe_points == 6,
|
|
5427
|
+ _7p_quadruple_circle = probe_points == 7,
|
|
5428
|
+ _7p_intermed_points = probe_points >= 4,
|
|
5429
|
+ _7p_multi_circle = probe_points >= 5;
|
|
5430
|
+
|
|
5431
|
+ #if DISABLED(PROBE_MANUALLY)
|
|
5432
|
+ const float dx = (X_PROBE_OFFSET_FROM_EXTRUDER),
|
|
5433
|
+ dy = (Y_PROBE_OFFSET_FROM_EXTRUDER);
|
|
5434
|
+ #endif
|
|
5435
|
+
|
|
5436
|
+ for (uint8_t i = 0; i < COUNT(z_at_pt); i++) z_at_pt[i] = 0.0;
|
|
5437
|
+
|
|
5438
|
+ if (!_0p_calibration) {
|
|
5439
|
+
|
|
5440
|
+ if (!_7p_half_circle && !_7p_triple_circle) { // probe the center
|
|
5441
|
+ #if ENABLED(PROBE_MANUALLY)
|
|
5442
|
+ z_at_pt[0] += lcd_probe_pt(0, 0);
|
|
5443
|
+ #else
|
|
5444
|
+ z_at_pt[0] += probe_pt(dx, dy, stow_after_each, 1, false);
|
|
5445
|
+ #endif
|
|
5446
|
+ }
|
|
5447
|
+
|
|
5448
|
+ if (_7p_calibration) { // probe extra center points
|
|
5449
|
+ for (int8_t axis = _7p_multi_circle ? COUNT(z_at_pt) - 2 : COUNT(z_at_pt) - 4; axis > 0; axis -= _7p_multi_circle ? 2 : 4) {
|
|
5450
|
+ const float a = RADIANS(180 + 30 * axis), r = delta_calibration_radius * 0.1;
|
|
5451
|
+ #if ENABLED(PROBE_MANUALLY)
|
|
5452
|
+ z_at_pt[0] += lcd_probe_pt(cos(a) * r, sin(a) * r);
|
|
5453
|
+ #else
|
|
5454
|
+ z_at_pt[0] += probe_pt(cos(a) * r + dx, sin(a) * r + dy, stow_after_each, 1);
|
|
5455
|
+ #endif
|
|
5456
|
+ }
|
|
5457
|
+ z_at_pt[0] /= float(_7p_double_circle ? 7 : probe_points);
|
|
5458
|
+ }
|
|
5459
|
+
|
|
5460
|
+ if (!_1p_calibration) { // probe the radius
|
|
5461
|
+ bool zig_zag = true;
|
|
5462
|
+ const uint8_t start = _4p_opposite_points ? 3 : 1,
|
|
5463
|
+ step = _4p_calibration ? 4 : _7p_half_circle ? 2 : 1;
|
|
5464
|
+ for (uint8_t axis = start; axis < COUNT(z_at_pt); axis += step) {
|
|
5465
|
+ const float zigadd = (zig_zag ? 0.5 : 0.0),
|
|
5466
|
+ offset_circles = _7p_quadruple_circle ? zigadd + 1.0 :
|
|
5467
|
+ _7p_triple_circle ? zigadd + 0.5 :
|
|
5468
|
+ _7p_double_circle ? zigadd : 0;
|
|
5469
|
+ for (float circles = -offset_circles ; circles <= offset_circles; circles++) {
|
|
5470
|
+ const float a = RADIANS(180 + 30 * axis),
|
|
5471
|
+ r = delta_calibration_radius * (1 + circles * (zig_zag ? 0.1 : -0.1));
|
|
5472
|
+ #if ENABLED(PROBE_MANUALLY)
|
|
5473
|
+ z_at_pt[axis] += lcd_probe_pt(cos(a) * r, sin(a) * r);
|
|
5474
|
+ #else
|
|
5475
|
+ z_at_pt[axis] += probe_pt(cos(a) * r + dx, sin(a) * r + dy, stow_after_each, 1);
|
|
5476
|
+ #endif
|
|
5477
|
+ }
|
|
5478
|
+ zig_zag = !zig_zag;
|
|
5479
|
+ z_at_pt[axis] /= (2 * offset_circles + 1);
|
|
5480
|
+ }
|
|
5481
|
+ }
|
|
5482
|
+
|
|
5483
|
+ if (_7p_intermed_points) // average intermediates to tower and opposites
|
|
5484
|
+ for (uint8_t axis = 1; axis < COUNT(z_at_pt); axis += 2)
|
|
5485
|
+ z_at_pt[axis] = (z_at_pt[axis] + (z_at_pt[axis + 1] + z_at_pt[(axis + 10) % 12 + 1]) / 2.0) / 2.0;
|
|
5486
|
+
|
|
5487
|
+ float S1 = z_at_pt[0],
|
|
5488
|
+ S2 = sq(z_at_pt[0]);
|
|
5489
|
+ int16_t N = 1;
|
|
5490
|
+ if (!_1p_calibration) // std dev from zero plane
|
|
5491
|
+ for (uint8_t axis = (_4p_opposite_points ? 3 : 1); axis < COUNT(z_at_pt); axis += (_4p_calibration ? 4 : 2)) {
|
|
5492
|
+ S1 += z_at_pt[axis];
|
|
5493
|
+ S2 += sq(z_at_pt[axis]);
|
|
5494
|
+ N++;
|
|
5495
|
+ }
|
|
5496
|
+ return round(SQRT(S2 / N) * 1000.0) / 1000.0 + 0.00001;
|
|
5497
|
+ }
|
|
5498
|
+
|
|
5499
|
+ return 0.00001;
|
|
5500
|
+ }
|
|
5501
|
+
|
|
5502
|
+ #if DISABLED(PROBE_MANUALLY)
|
|
5503
|
+
|
|
5504
|
+ static void G33_auto_tune() {
|
|
5505
|
+ float z_at_pt[13] = { 0.0 },
|
|
5506
|
+ z_at_pt_base[13] = { 0.0 },
|
|
5507
|
+ z_temp, h_fac = 0.0, r_fac = 0.0, a_fac = 0.0, norm = 0.8;
|
|
5508
|
+
|
|
5509
|
+ #define ZP(N,I) ((N) * z_at_pt[I])
|
|
5510
|
+ #define Z06(I) ZP(6, I)
|
|
5511
|
+ #define Z03(I) ZP(3, I)
|
|
5512
|
+ #define Z02(I) ZP(2, I)
|
|
5513
|
+ #define Z01(I) ZP(1, I)
|
|
5514
|
+ #define Z32(I) ZP(3/2, I)
|
|
5515
|
+
|
|
5516
|
+ SERIAL_PROTOCOLPGM("AUTO TUNE baseline");
|
|
5517
|
+ SERIAL_EOL();
|
|
5518
|
+ probe_G33_points(z_at_pt_base, 3, true, false);
|
|
5519
|
+ print_G33_results(z_at_pt_base, true, true);
|
|
5520
|
+
|
|
5521
|
+ LOOP_XYZ(axis) {
|
|
5522
|
+ delta_endstop_adj[axis] -= 1.0;
|
|
5523
|
+
|
|
5524
|
+ endstops.enable(true);
|
|
5525
|
+ if (!home_delta()) return;
|
|
5526
|
+ endstops.not_homing();
|
|
5527
|
+
|
|
5528
|
+ SERIAL_PROTOCOLPGM("Tuning E");
|
|
5529
|
+ SERIAL_CHAR(tolower(axis_codes[axis]));
|
|
5530
|
+ SERIAL_EOL();
|
|
5531
|
+
|
|
5532
|
+ probe_G33_points(z_at_pt, 3, true, false);
|
|
5533
|
+ for (int8_t i = 0; i < COUNT(z_at_pt); i++) z_at_pt[i] -= z_at_pt_base[i];
|
|
5534
|
+ print_G33_results(z_at_pt, true, true);
|
|
5535
|
+ delta_endstop_adj[axis] += 1.0;
|
|
5536
|
+ switch (axis) {
|
|
5537
|
+ case A_AXIS :
|
|
5538
|
+ h_fac += 4.0 / (Z03(0) +Z01(1) +Z32(11) +Z32(3)); // Offset by X-tower end-stop
|
|
5539
|
+ break;
|
|
5540
|
+ case B_AXIS :
|
|
5541
|
+ h_fac += 4.0 / (Z03(0) +Z01(5) +Z32(7) +Z32(3)); // Offset by Y-tower end-stop
|
|
5542
|
+ break;
|
|
5543
|
+ case C_AXIS :
|
|
5544
|
+ h_fac += 4.0 / (Z03(0) +Z01(9) +Z32(7) +Z32(11) ); // Offset by Z-tower end-stop
|
|
5545
|
+ break;
|
|
5546
|
+ }
|
|
5547
|
+ }
|
|
5548
|
+ h_fac /= 3.0;
|
|
5549
|
+ h_fac *= norm; // Normalize to 1.02 for Kossel mini
|
|
5550
|
+
|
|
5551
|
+ for (int8_t zig_zag = -1; zig_zag < 2; zig_zag += 2) {
|
|
5552
|
+ delta_radius += 1.0 * zig_zag;
|
|
5553
|
+ recalc_delta_settings(delta_radius, delta_diagonal_rod, delta_tower_angle_trim);
|
|
5554
|
+
|
|
5555
|
+ endstops.enable(true);
|
|
5556
|
+ if (!home_delta()) return;
|
|
5557
|
+ endstops.not_homing();
|
|
5558
|
+
|
|
5559
|
+ SERIAL_PROTOCOLPGM("Tuning R");
|
|
5560
|
+ SERIAL_PROTOCOL(zig_zag == -1 ? "-" : "+");
|
|
5561
|
+ SERIAL_EOL();
|
|
5562
|
+ probe_G33_points(z_at_pt, 3, true, false);
|
|
5563
|
+ for (int8_t i = 0; i < COUNT(z_at_pt); i++) z_at_pt[i] -= z_at_pt_base[i];
|
|
5564
|
+ print_G33_results(z_at_pt, true, true);
|
|
5565
|
+ delta_radius -= 1.0 * zig_zag;
|
|
5566
|
+ recalc_delta_settings(delta_radius, delta_diagonal_rod, delta_tower_angle_trim);
|
|
5567
|
+ r_fac -= zig_zag * 6.0 / (Z03(1) + Z03(5) + Z03(9) + Z03(7) + Z03(11) + Z03(3)); // Offset by delta radius
|
|
5568
|
+ }
|
|
5569
|
+ r_fac /= 2.0;
|
|
5570
|
+ r_fac *= 3 * norm; // Normalize to 2.25 for Kossel mini
|
|
5571
|
+
|
|
5572
|
+ LOOP_XYZ(axis) {
|
|
5573
|
+ delta_tower_angle_trim[axis] += 1.0;
|
|
5574
|
+ delta_endstop_adj[(axis + 1) % 3] -= 1.0 / 4.5;
|
|
5575
|
+ delta_endstop_adj[(axis + 2) % 3] += 1.0 / 4.5;
|
|
5576
|
+ z_temp = MAX3(delta_endstop_adj[A_AXIS], delta_endstop_adj[B_AXIS], delta_endstop_adj[C_AXIS]);
|
|
5577
|
+ home_offset[Z_AXIS] -= z_temp;
|
|
5578
|
+ LOOP_XYZ(axis) delta_endstop_adj[axis] -= z_temp;
|
|
5579
|
+ recalc_delta_settings(delta_radius, delta_diagonal_rod, delta_tower_angle_trim);
|
|
5580
|
+
|
|
5581
|
+ endstops.enable(true);
|
|
5582
|
+ if (!home_delta()) return;
|
|
5583
|
+ endstops.not_homing();
|
|
5584
|
+
|
|
5585
|
+ SERIAL_PROTOCOLPGM("Tuning T");
|
|
5586
|
+ SERIAL_CHAR(tolower(axis_codes[axis]));
|
|
5587
|
+ SERIAL_EOL();
|
|
5588
|
+
|
|
5589
|
+ probe_G33_points(z_at_pt, 3, true, false);
|
|
5590
|
+ for (int8_t i = 0; i < COUNT(z_at_pt); i++) z_at_pt[i] -= z_at_pt_base[i];
|
|
5591
|
+ print_G33_results(z_at_pt, true, true);
|
|
5592
|
+
|
|
5593
|
+ delta_tower_angle_trim[axis] -= 1.0;
|
|
5594
|
+ delta_endstop_adj[(axis+1) % 3] += 1.0/4.5;
|
|
5595
|
+ delta_endstop_adj[(axis+2) % 3] -= 1.0/4.5;
|
|
5596
|
+ z_temp = MAX3(delta_endstop_adj[A_AXIS], delta_endstop_adj[B_AXIS], delta_endstop_adj[C_AXIS]);
|
|
5597
|
+ home_offset[Z_AXIS] -= z_temp;
|
|
5598
|
+ LOOP_XYZ(axis) delta_endstop_adj[axis] -= z_temp;
|
|
5599
|
+ recalc_delta_settings(delta_radius, delta_diagonal_rod, delta_tower_angle_trim);
|
|
5600
|
+ switch (axis) {
|
|
5601
|
+ case A_AXIS :
|
|
5602
|
+ a_fac += 4.0 / ( Z06(5) -Z06(9) +Z06(11) -Z06(3)); // Offset by alpha tower angle
|
|
5603
|
+ break;
|
|
5604
|
+ case B_AXIS :
|
|
5605
|
+ a_fac += 4.0 / (-Z06(1) +Z06(9) -Z06(7) +Z06(3)); // Offset by beta tower angle
|
|
5606
|
+ break;
|
|
5607
|
+ case C_AXIS :
|
|
5608
|
+ a_fac += 4.0 / (Z06(1) -Z06(5) +Z06(7) -Z06(11) ); // Offset by gamma tower angle
|
|
5609
|
+ break;
|
|
5610
|
+ }
|
|
5611
|
+ }
|
|
5612
|
+ a_fac /= 3.0;
|
|
5613
|
+ a_fac *= norm; // Normalize to 0.83 for Kossel mini
|
|
5614
|
+
|
|
5615
|
+ endstops.enable(true);
|
|
5616
|
+ if (!home_delta()) return;
|
|
5617
|
+ endstops.not_homing();
|
|
5618
|
+ print_signed_float(PSTR( "H_FACTOR: "), h_fac);
|
|
5619
|
+ print_signed_float(PSTR(" R_FACTOR: "), r_fac);
|
|
5620
|
+ print_signed_float(PSTR(" A_FACTOR: "), a_fac);
|
|
5621
|
+ SERIAL_EOL();
|
|
5622
|
+ SERIAL_PROTOCOLPGM("Copy these values to Configuration.h");
|
|
5623
|
+ SERIAL_EOL();
|
|
5624
|
+ }
|
|
5625
|
+
|
|
5626
|
+ #endif // !PROBE_MANUALLY
|
|
5627
|
+
|
|
5628
|
+ /**
|
|
5629
|
+ * G33 - Delta '1-4-7-point' Auto-Calibration
|
|
5630
|
+ * Calibrate height, endstops, delta radius, and tower angles.
|
|
5631
|
+ *
|
|
5632
|
+ * Parameters:
|
|
5633
|
+ *
|
|
5634
|
+ * Pn Number of probe points:
|
|
5635
|
+ * P0 No probe. Normalize only.
|
|
5636
|
+ * P1 Probe center and set height only.
|
|
5637
|
+ * P2 Probe center and towers. Set height, endstops and delta radius.
|
|
5638
|
+ * P3 Probe all positions: center, towers and opposite towers. Set all.
|
|
5639
|
+ * P4-P7 Probe all positions at different locations and average them.
|
|
5640
|
+ *
|
|
5641
|
+ * T Don't calibrate tower angle corrections
|
|
5642
|
+ *
|
|
5643
|
+ * Cn.nn Calibration precision; when omitted calibrates to maximum precision
|
|
5644
|
+ *
|
|
5645
|
+ * Fn Force to run at least n iterations and takes the best result
|
|
5646
|
+ *
|
|
5647
|
+ * A Auto tune calibartion factors (set in Configuration.h)
|
|
5648
|
+ *
|
|
5649
|
+ * Vn Verbose level:
|
|
5650
|
+ * V0 Dry-run mode. Report settings and probe results. No calibration.
|
|
5651
|
+ * V1 Report settings
|
|
5652
|
+ * V2 Report settings and probe results
|
|
5653
|
+ *
|
|
5654
|
+ * E Engage the probe for each point
|
|
5655
|
+ */
|
5412
|
5656
|
inline void gcode_G33() {
|
5413
|
5657
|
|
5414
|
5658
|
const int8_t probe_points = parser.intval('P', DELTA_CALIBRATION_DEFAULT_POINTS);
|
|
@@ -5425,7 +5669,7 @@ void home_all_axes() { gcode_G28(true); }
|
5425
|
5669
|
|
5426
|
5670
|
const float calibration_precision = parser.floatval('C');
|
5427
|
5671
|
if (calibration_precision < 0) {
|
5428
|
|
- SERIAL_PROTOCOLLNPGM("?(C)alibration precision is implausible (>0).");
|
|
5672
|
+ SERIAL_PROTOCOLLNPGM("?(C)alibration precision is implausible (>=0).");
|
5429
|
5673
|
return;
|
5430
|
5674
|
}
|
5431
|
5675
|
|
|
@@ -5436,31 +5680,29 @@ void home_all_axes() { gcode_G28(true); }
|
5436
|
5680
|
}
|
5437
|
5681
|
|
5438
|
5682
|
const bool towers_set = !parser.boolval('T'),
|
|
5683
|
+ auto_tune = parser.boolval('A'),
|
5439
|
5684
|
stow_after_each = parser.boolval('E'),
|
5440
|
5685
|
_0p_calibration = probe_points == 0,
|
5441
|
5686
|
_1p_calibration = probe_points == 1,
|
5442
|
5687
|
_4p_calibration = probe_points == 2,
|
5443
|
|
- _4p_towers_points = _4p_calibration && towers_set,
|
5444
|
|
- _4p_opposite_points = _4p_calibration && !towers_set,
|
5445
|
|
- _7p_calibration = probe_points >= 3 || _0p_calibration,
|
5446
|
|
- _7p_half_circle = probe_points == 3,
|
|
5688
|
+ _tower_results = (_4p_calibration && towers_set)
|
|
5689
|
+ || probe_points >= 3 || probe_points == 0,
|
|
5690
|
+ _opposite_results = (_4p_calibration && !towers_set)
|
|
5691
|
+ || probe_points >= 3 || probe_points == 0,
|
|
5692
|
+ _endstop_results = probe_points != 1,
|
|
5693
|
+ _angle_results = (probe_points >= 3 || probe_points == 0) && towers_set,
|
5447
|
5694
|
_7p_double_circle = probe_points == 5,
|
5448
|
5695
|
_7p_triple_circle = probe_points == 6,
|
5449
|
|
- _7p_quadruple_circle = probe_points == 7,
|
5450
|
|
- _7p_multi_circle = _7p_double_circle || _7p_triple_circle || _7p_quadruple_circle,
|
5451
|
|
- _7p_intermed_points = _7p_calibration && !_7p_half_circle;
|
|
5696
|
+ _7p_quadruple_circle = probe_points == 7;
|
5452
|
5697
|
const static char save_message[] PROGMEM = "Save with M500 and/or copy to Configuration.h";
|
5453
|
|
- const float dx = (X_PROBE_OFFSET_FROM_EXTRUDER),
|
5454
|
|
- dy = (Y_PROBE_OFFSET_FROM_EXTRUDER);
|
5455
|
5698
|
int8_t iterations = 0;
|
5456
|
5699
|
float test_precision,
|
5457
|
5700
|
zero_std_dev = (verbose_level ? 999.0 : 0.0), // 0.0 in dry-run mode : forced end
|
5458
|
|
- zero_std_dev_old = zero_std_dev,
|
5459
|
5701
|
zero_std_dev_min = zero_std_dev,
|
5460
|
5702
|
e_old[ABC] = {
|
5461
|
|
- endstop_adj[A_AXIS],
|
5462
|
|
- endstop_adj[B_AXIS],
|
5463
|
|
- endstop_adj[C_AXIS]
|
|
5703
|
+ delta_endstop_adj[A_AXIS],
|
|
5704
|
+ delta_endstop_adj[B_AXIS],
|
|
5705
|
+ delta_endstop_adj[C_AXIS]
|
5464
|
5706
|
},
|
5465
|
5707
|
dr_old = delta_radius,
|
5466
|
5708
|
zh_old = home_offset[Z_AXIS],
|
|
@@ -5470,12 +5712,14 @@ void home_all_axes() { gcode_G28(true); }
|
5470
|
5712
|
delta_tower_angle_trim[C_AXIS]
|
5471
|
5713
|
};
|
5472
|
5714
|
|
|
5715
|
+ SERIAL_PROTOCOLLNPGM("G33 Auto Calibrate");
|
|
5716
|
+
|
5473
|
5717
|
if (!_1p_calibration && !_0p_calibration) { // test if the outer radius is reachable
|
5474
|
5718
|
const float circles = (_7p_quadruple_circle ? 1.5 :
|
5475
|
5719
|
_7p_triple_circle ? 1.0 :
|
5476
|
5720
|
_7p_double_circle ? 0.5 : 0),
|
5477
|
5721
|
r = (1 + circles * 0.1) * delta_calibration_radius;
|
5478
|
|
- for (uint8_t axis = 1; axis < 13; ++axis) {
|
|
5722
|
+ for (uint8_t axis = 1; axis <= 12; ++axis) {
|
5479
|
5723
|
const float a = RADIANS(180 + 30 * axis);
|
5480
|
5724
|
if (!position_is_reachable_xy(cos(a) * r, sin(a) * r)) {
|
5481
|
5725
|
SERIAL_PROTOCOLLNPGM("?(M665 B)ed radius is implausible.");
|
|
@@ -5483,7 +5727,6 @@ void home_all_axes() { gcode_G28(true); }
|
5483
|
5727
|
}
|
5484
|
5728
|
}
|
5485
|
5729
|
}
|
5486
|
|
- SERIAL_PROTOCOLLNPGM("G33 Auto Calibrate");
|
5487
|
5730
|
|
5488
|
5731
|
stepper.synchronize();
|
5489
|
5732
|
#if HAS_LEVELING
|
|
@@ -5506,7 +5749,17 @@ void home_all_axes() { gcode_G28(true); }
|
5506
|
5749
|
endstops.not_homing();
|
5507
|
5750
|
}
|
5508
|
5751
|
|
5509
|
|
- // print settings
|
|
5752
|
+ if (auto_tune) {
|
|
5753
|
+ #if ENABLED(PROBE_MANUALLY)
|
|
5754
|
+ SERIAL_PROTOCOLLNPGM("A probe is needed for auto-tune");
|
|
5755
|
+ #else
|
|
5756
|
+ G33_auto_tune();
|
|
5757
|
+ #endif
|
|
5758
|
+ G33_CLEANUP();
|
|
5759
|
+ return;
|
|
5760
|
+ }
|
|
5761
|
+
|
|
5762
|
+ // Report settings
|
5510
|
5763
|
|
5511
|
5764
|
const char *checkingac = PSTR("Checking... AC"); // TODO: Make translatable string
|
5512
|
5765
|
serialprintPGM(checkingac);
|
|
@@ -5514,94 +5767,50 @@ void home_all_axes() { gcode_G28(true); }
|
5514
|
5767
|
SERIAL_EOL();
|
5515
|
5768
|
lcd_setstatusPGM(checkingac);
|
5516
|
5769
|
|
5517
|
|
- print_G33_settings(!_1p_calibration, _7p_calibration && towers_set);
|
|
5770
|
+ print_G33_settings(_endstop_results, _angle_results);
|
5518
|
5771
|
|
5519
|
5772
|
do {
|
5520
|
5773
|
|
5521
|
5774
|
float z_at_pt[13] = { 0.0 };
|
5522
|
5775
|
|
5523
|
|
- test_precision = zero_std_dev_old != 999.0 ? (zero_std_dev + zero_std_dev_old) / 2 : zero_std_dev;
|
|
5776
|
+ test_precision = zero_std_dev;
|
|
5777
|
+
|
5524
|
5778
|
iterations++;
|
5525
|
5779
|
|
5526
|
5780
|
// Probe the points
|
5527
|
5781
|
|
5528
|
|
- if (!_0p_calibration){
|
5529
|
|
- if (!_7p_half_circle && !_7p_triple_circle) { // probe the center
|
5530
|
|
- #if ENABLED(PROBE_MANUALLY)
|
5531
|
|
- z_at_pt[0] += lcd_probe_pt(0, 0);
|
5532
|
|
- #else
|
5533
|
|
- z_at_pt[0] += probe_pt(dx, dy, stow_after_each, 1, false);
|
5534
|
|
- if (isnan(z_at_pt[0])) return G33_CLEANUP();
|
5535
|
|
- #endif
|
5536
|
|
- }
|
5537
|
|
- if (_7p_calibration) { // probe extra center points
|
5538
|
|
- for (int8_t axis = _7p_multi_circle ? 11 : 9; axis > 0; axis -= _7p_multi_circle ? 2 : 4) {
|
5539
|
|
- const float a = RADIANS(180 + 30 * axis), r = delta_calibration_radius * 0.1;
|
5540
|
|
- #if ENABLED(PROBE_MANUALLY)
|
5541
|
|
- z_at_pt[0] += lcd_probe_pt(cos(a) * r, sin(a) * r);
|
5542
|
|
- #else
|
5543
|
|
- z_at_pt[0] += probe_pt(cos(a) * r + dx, sin(a) * r + dy, stow_after_each, 1);
|
5544
|
|
- if (isnan(z_at_pt[0])) return G33_CLEANUP();
|
5545
|
|
- #endif
|
5546
|
|
- }
|
5547
|
|
- z_at_pt[0] /= float(_7p_double_circle ? 7 : probe_points);
|
5548
|
|
- }
|
5549
|
|
- if (!_1p_calibration) { // probe the radius
|
5550
|
|
- bool zig_zag = true;
|
5551
|
|
- const uint8_t start = _4p_opposite_points ? 3 : 1,
|
5552
|
|
- step = _4p_calibration ? 4 : _7p_half_circle ? 2 : 1;
|
5553
|
|
- for (uint8_t axis = start; axis < 13; axis += step) {
|
5554
|
|
- const float zigadd = (zig_zag ? 0.5 : 0.0),
|
5555
|
|
- offset_circles = _7p_quadruple_circle ? zigadd + 1.0 :
|
5556
|
|
- _7p_triple_circle ? zigadd + 0.5 :
|
5557
|
|
- _7p_double_circle ? zigadd : 0;
|
5558
|
|
- for (float circles = -offset_circles ; circles <= offset_circles; circles++) {
|
5559
|
|
- const float a = RADIANS(180 + 30 * axis),
|
5560
|
|
- r = delta_calibration_radius * (1 + circles * (zig_zag ? 0.1 : -0.1));
|
5561
|
|
- #if ENABLED(PROBE_MANUALLY)
|
5562
|
|
- z_at_pt[axis] += lcd_probe_pt(cos(a) * r, sin(a) * r);
|
5563
|
|
- #else
|
5564
|
|
- z_at_pt[axis] += probe_pt(cos(a) * r + dx, sin(a) * r + dy, stow_after_each, 1);
|
5565
|
|
- if (isnan(z_at_pt[axis])) return G33_CLEANUP();
|
5566
|
|
- #endif
|
5567
|
|
- }
|
5568
|
|
- zig_zag = !zig_zag;
|
5569
|
|
- z_at_pt[axis] /= (2 * offset_circles + 1);
|
5570
|
|
- }
|
5571
|
|
- }
|
5572
|
|
- if (_7p_intermed_points) // average intermediates to tower and opposites
|
5573
|
|
- for (uint8_t axis = 1; axis < 13; axis += 2)
|
5574
|
|
- z_at_pt[axis] = (z_at_pt[axis] + (z_at_pt[axis + 1] + z_at_pt[(axis + 10) % 12 + 1]) / 2.0) / 2.0;
|
5575
|
|
-
|
5576
|
|
- }
|
5577
|
|
- float S1 = z_at_pt[0],
|
5578
|
|
- S2 = sq(z_at_pt[0]);
|
5579
|
|
- int16_t N = 1;
|
5580
|
|
- if (!_1p_calibration) // std dev from zero plane
|
5581
|
|
- for (uint8_t axis = (_4p_opposite_points ? 3 : 1); axis < 13; axis += (_4p_calibration ? 4 : 2)) {
|
5582
|
|
- S1 += z_at_pt[axis];
|
5583
|
|
- S2 += sq(z_at_pt[axis]);
|
5584
|
|
- N++;
|
5585
|
|
- }
|
5586
|
|
- zero_std_dev_old = zero_std_dev;
|
5587
|
|
- zero_std_dev = round(SQRT(S2 / N) * 1000.0) / 1000.0 + 0.00001;
|
|
5782
|
+ zero_std_dev = probe_G33_points(z_at_pt, probe_points, towers_set, stow_after_each);
|
5588
|
5783
|
|
5589
|
5784
|
// Solve matrices
|
5590
|
5785
|
|
5591
|
5786
|
if ((zero_std_dev < test_precision || iterations <= force_iterations) && zero_std_dev > calibration_precision) {
|
5592
|
5787
|
if (zero_std_dev < zero_std_dev_min) {
|
5593
|
|
- COPY(e_old, endstop_adj);
|
|
5788
|
+ COPY(e_old, delta_endstop_adj);
|
5594
|
5789
|
dr_old = delta_radius;
|
5595
|
5790
|
zh_old = home_offset[Z_AXIS];
|
5596
|
5791
|
COPY(ta_old, delta_tower_angle_trim);
|
5597
|
5792
|
}
|
5598
|
5793
|
|
5599
|
5794
|
float e_delta[ABC] = { 0.0 }, r_delta = 0.0, t_delta[ABC] = { 0.0 };
|
5600
|
|
-
|
5601
|
5795
|
const float r_diff = delta_radius - delta_calibration_radius,
|
5602
|
|
- h_factor = (1.00 + r_diff * 0.001) / 6.0, // 1.02 for r_diff = 20mm
|
5603
|
|
- r_factor = (-(1.75 + 0.005 * r_diff + 0.001 * sq(r_diff))) / 6.0, // 2.25 for r_diff = 20mm
|
5604
|
|
- a_factor = (66.66 / delta_calibration_radius) / (iterations == 1 ? 16.0 : 2.0); // 0.83 for cal_rd = 80mm (Slow down on 1st iteration)
|
|
5796
|
+ h_factor = 1 / 6.0 *
|
|
5797
|
+ #ifdef H_FACTOR
|
|
5798
|
+ (H_FACTOR), // Set in Configuration.h
|
|
5799
|
+ #else
|
|
5800
|
+ (1.00 + r_diff * 0.001), // 1.02 for r_diff = 20mm
|
|
5801
|
+ #endif
|
|
5802
|
+ r_factor = 1 / 6.0 *
|
|
5803
|
+ #ifdef R_FACTOR
|
|
5804
|
+ -(R_FACTOR), // Set in Configuration.h
|
|
5805
|
+ #else
|
|
5806
|
+ -(1.75 + 0.005 * r_diff + 0.001 * sq(r_diff)), // 2.25 for r_diff = 20mm
|
|
5807
|
+ #endif
|
|
5808
|
+ a_factor = 1 / 6.0 *
|
|
5809
|
+ #ifdef A_FACTOR
|
|
5810
|
+ (A_FACTOR); // Set in Configuration.h
|
|
5811
|
+ #else
|
|
5812
|
+ (66.66 / delta_calibration_radius); // 0.83 for cal_rd = 80mm
|
|
5813
|
+ #endif
|
5605
|
5814
|
|
5606
|
5815
|
#define ZP(N,I) ((N) * z_at_pt[I])
|
5607
|
5816
|
#define Z6(I) ZP(6, I)
|
|
@@ -5615,15 +5824,11 @@ void home_all_axes() { gcode_G28(true); }
|
5615
|
5824
|
|
5616
|
5825
|
switch (probe_points) {
|
5617
|
5826
|
case 0:
|
5618
|
|
- #if DISABLED(PROBE_MANUALLY)
|
5619
|
|
- test_precision = 0.00; // forced end
|
5620
|
|
- #endif
|
|
5827
|
+ test_precision = 0.00; // forced end
|
5621
|
5828
|
break;
|
5622
|
5829
|
|
5623
|
5830
|
case 1:
|
5624
|
|
- #if DISABLED(PROBE_MANUALLY)
|
5625
|
|
- test_precision = 0.00; // forced end
|
5626
|
|
- #endif
|
|
5831
|
+ test_precision = 0.00; // forced end
|
5627
|
5832
|
LOOP_XYZ(axis) e_delta[axis] = Z1(0);
|
5628
|
5833
|
break;
|
5629
|
5834
|
|
|
@@ -5649,9 +5854,9 @@ void home_all_axes() { gcode_G28(true); }
|
5649
|
5854
|
r_delta = (Z6(0) - Z1(1) - Z1(5) - Z1(9) - Z1(7) - Z1(11) - Z1(3)) * r_factor;
|
5650
|
5855
|
|
5651
|
5856
|
if (towers_set) {
|
5652
|
|
- t_delta[A_AXIS] = ( - Z2(5) + Z2(9) - Z2(11) + Z2(3)) * a_factor;
|
5653
|
|
- t_delta[B_AXIS] = ( Z2(1) - Z2(9) + Z2(7) - Z2(3)) * a_factor;
|
5654
|
|
- t_delta[C_AXIS] = (-Z2(1) + Z2(5) - Z2(7) + Z2(11) ) * a_factor;
|
|
5857
|
+ t_delta[A_AXIS] = ( - Z4(5) + Z4(9) - Z4(11) + Z4(3)) * a_factor;
|
|
5858
|
+ t_delta[B_AXIS] = ( Z4(1) - Z4(9) + Z4(7) - Z4(3)) * a_factor;
|
|
5859
|
+ t_delta[C_AXIS] = (-Z4(1) + Z4(5) - Z4(7) + Z4(11) ) * a_factor;
|
5655
|
5860
|
e_delta[A_AXIS] += (t_delta[B_AXIS] - t_delta[C_AXIS]) / 4.5;
|
5656
|
5861
|
e_delta[B_AXIS] += (t_delta[C_AXIS] - t_delta[A_AXIS]) / 4.5;
|
5657
|
5862
|
e_delta[C_AXIS] += (t_delta[A_AXIS] - t_delta[B_AXIS]) / 4.5;
|
|
@@ -5659,12 +5864,12 @@ void home_all_axes() { gcode_G28(true); }
|
5659
|
5864
|
break;
|
5660
|
5865
|
}
|
5661
|
5866
|
|
5662
|
|
- LOOP_XYZ(axis) endstop_adj[axis] += e_delta[axis];
|
|
5867
|
+ LOOP_XYZ(axis) delta_endstop_adj[axis] += e_delta[axis];
|
5663
|
5868
|
delta_radius += r_delta;
|
5664
|
5869
|
LOOP_XYZ(axis) delta_tower_angle_trim[axis] += t_delta[axis];
|
5665
|
5870
|
}
|
5666
|
5871
|
else if (zero_std_dev >= test_precision) { // step one back
|
5667
|
|
- COPY(endstop_adj, e_old);
|
|
5872
|
+ COPY(delta_endstop_adj, e_old);
|
5668
|
5873
|
delta_radius = dr_old;
|
5669
|
5874
|
home_offset[Z_AXIS] = zh_old;
|
5670
|
5875
|
COPY(delta_tower_angle_trim, ta_old);
|
|
@@ -5672,44 +5877,29 @@ void home_all_axes() { gcode_G28(true); }
|
5672
|
5877
|
|
5673
|
5878
|
if (verbose_level != 0) { // !dry run
|
5674
|
5879
|
// normalise angles to least squares
|
5675
|
|
- float a_sum = 0.0;
|
5676
|
|
- LOOP_XYZ(axis) a_sum += delta_tower_angle_trim[axis];
|
5677
|
|
- LOOP_XYZ(axis) delta_tower_angle_trim[axis] -= a_sum / 3.0;
|
|
5880
|
+ if (_angle_results) {
|
|
5881
|
+ float a_sum = 0.0;
|
|
5882
|
+ LOOP_XYZ(axis) a_sum += delta_tower_angle_trim[axis];
|
|
5883
|
+ LOOP_XYZ(axis) delta_tower_angle_trim[axis] -= a_sum / 3.0;
|
|
5884
|
+ }
|
5678
|
5885
|
|
5679
|
5886
|
// adjust delta_height and endstops by the max amount
|
5680
|
|
- const float z_temp = MAX3(endstop_adj[A_AXIS], endstop_adj[B_AXIS], endstop_adj[C_AXIS]);
|
|
5887
|
+ const float z_temp = MAX3(delta_endstop_adj[A_AXIS], delta_endstop_adj[B_AXIS], delta_endstop_adj[C_AXIS]);
|
5681
|
5888
|
home_offset[Z_AXIS] -= z_temp;
|
5682
|
|
- LOOP_XYZ(axis) endstop_adj[axis] -= z_temp;
|
|
5889
|
+ LOOP_XYZ(axis) delta_endstop_adj[axis] -= z_temp;
|
5683
|
5890
|
}
|
5684
|
5891
|
recalc_delta_settings(delta_radius, delta_diagonal_rod, delta_tower_angle_trim);
|
5685
|
5892
|
NOMORE(zero_std_dev_min, zero_std_dev);
|
5686
|
5893
|
|
5687
|
5894
|
// print report
|
5688
|
5895
|
|
5689
|
|
- if (verbose_level != 1) {
|
5690
|
|
- SERIAL_PROTOCOLPGM(". ");
|
5691
|
|
- print_signed_float(PSTR("c"), z_at_pt[0]);
|
5692
|
|
- if (_4p_towers_points || _7p_calibration) {
|
5693
|
|
- print_signed_float(PSTR(" x"), z_at_pt[1]);
|
5694
|
|
- print_signed_float(PSTR(" y"), z_at_pt[5]);
|
5695
|
|
- print_signed_float(PSTR(" z"), z_at_pt[9]);
|
5696
|
|
- }
|
5697
|
|
- if (!_4p_opposite_points) SERIAL_EOL();
|
5698
|
|
- if ((_4p_opposite_points) || _7p_calibration) {
|
5699
|
|
- if (_7p_calibration) {
|
5700
|
|
- SERIAL_CHAR('.');
|
5701
|
|
- SERIAL_PROTOCOL_SP(13);
|
5702
|
|
- }
|
5703
|
|
- print_signed_float(PSTR(" yz"), z_at_pt[7]);
|
5704
|
|
- print_signed_float(PSTR("zx"), z_at_pt[11]);
|
5705
|
|
- print_signed_float(PSTR("xy"), z_at_pt[3]);
|
5706
|
|
- SERIAL_EOL();
|
5707
|
|
- }
|
5708
|
|
- }
|
|
5896
|
+ if (verbose_level != 1)
|
|
5897
|
+ print_G33_results(z_at_pt, _tower_results, _opposite_results);
|
|
5898
|
+
|
5709
|
5899
|
if (verbose_level != 0) { // !dry run
|
5710
|
5900
|
if ((zero_std_dev >= test_precision && iterations > force_iterations) || zero_std_dev <= calibration_precision) { // end iterations
|
5711
|
5901
|
SERIAL_PROTOCOLPGM("Calibration OK");
|
5712
|
|
- SERIAL_PROTOCOL_SP(36);
|
|
5902
|
+ SERIAL_PROTOCOL_SP(32);
|
5713
|
5903
|
#if DISABLED(PROBE_MANUALLY)
|
5714
|
5904
|
if (zero_std_dev >= test_precision && !_1p_calibration)
|
5715
|
5905
|
SERIAL_PROTOCOLPGM("rolling back.");
|
|
@@ -5727,7 +5917,7 @@ void home_all_axes() { gcode_G28(true); }
|
5727
|
5917
|
else
|
5728
|
5918
|
sprintf_P(&mess[15], PSTR("%03i.x"), (int)round(zero_std_dev_min));
|
5729
|
5919
|
lcd_setstatus(mess);
|
5730
|
|
- print_G33_settings(!_1p_calibration, _7p_calibration && towers_set);
|
|
5920
|
+ print_G33_settings(_endstop_results, _angle_results);
|
5731
|
5921
|
serialprintPGM(save_message);
|
5732
|
5922
|
SERIAL_EOL();
|
5733
|
5923
|
}
|
|
@@ -5738,18 +5928,18 @@ void home_all_axes() { gcode_G28(true); }
|
5738
|
5928
|
else
|
5739
|
5929
|
sprintf_P(mess, PSTR("No convergence"));
|
5740
|
5930
|
SERIAL_PROTOCOL(mess);
|
5741
|
|
- SERIAL_PROTOCOL_SP(36);
|
|
5931
|
+ SERIAL_PROTOCOL_SP(32);
|
5742
|
5932
|
SERIAL_PROTOCOLPGM("std dev:");
|
5743
|
5933
|
SERIAL_PROTOCOL_F(zero_std_dev, 3);
|
5744
|
5934
|
SERIAL_EOL();
|
5745
|
5935
|
lcd_setstatus(mess);
|
5746
|
|
- print_G33_settings(!_1p_calibration, _7p_calibration && towers_set);
|
|
5936
|
+ print_G33_settings(_endstop_results, _angle_results);
|
5747
|
5937
|
}
|
5748
|
5938
|
}
|
5749
|
5939
|
else { // dry run
|
5750
|
5940
|
const char *enddryrun = PSTR("End DRY-RUN");
|
5751
|
5941
|
serialprintPGM(enddryrun);
|
5752
|
|
- SERIAL_PROTOCOL_SP(39);
|
|
5942
|
+ SERIAL_PROTOCOL_SP(35);
|
5753
|
5943
|
SERIAL_PROTOCOLPGM("std dev:");
|
5754
|
5944
|
SERIAL_PROTOCOL_F(zero_std_dev, 3);
|
5755
|
5945
|
SERIAL_EOL();
|
|
@@ -5765,7 +5955,8 @@ void home_all_axes() { gcode_G28(true); }
|
5765
|
5955
|
}
|
5766
|
5956
|
|
5767
|
5957
|
endstops.enable(true);
|
5768
|
|
- home_delta();
|
|
5958
|
+ if (!home_delta())
|
|
5959
|
+ return;
|
5769
|
5960
|
endstops.not_homing();
|
5770
|
5961
|
|
5771
|
5962
|
}
|
|
@@ -8649,11 +8840,11 @@ inline void gcode_M205() {
|
8649
|
8840
|
LOOP_XYZ(i) {
|
8650
|
8841
|
if (parser.seen(axis_codes[i])) {
|
8651
|
8842
|
if (parser.value_linear_units() * Z_HOME_DIR <= 0)
|
8652
|
|
- endstop_adj[i] = parser.value_linear_units();
|
|
8843
|
+ delta_endstop_adj[i] = parser.value_linear_units();
|
8653
|
8844
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
8654
|
8845
|
if (DEBUGGING(LEVELING)) {
|
8655
|
|
- SERIAL_ECHOPAIR("endstop_adj[", axis_codes[i]);
|
8656
|
|
- SERIAL_ECHOLNPAIR("] = ", endstop_adj[i]);
|
|
8846
|
+ SERIAL_ECHOPAIR("delta_endstop_adj[", axis_codes[i]);
|
|
8847
|
+ SERIAL_ECHOLNPAIR("] = ", delta_endstop_adj[i]);
|
8657
|
8848
|
}
|
8658
|
8849
|
#endif
|
8659
|
8850
|
}
|