|
@@ -5168,11 +5168,28 @@ void home_all_axes() { gcode_G28(true); }
|
5168
|
5168
|
SERIAL_PROTOCOL_F(f, 2);
|
5169
|
5169
|
}
|
5170
|
5170
|
|
|
5171
|
+ inline void print_G33_settings(const bool end_stops, const bool tower_angles){ // TODO echo these to LCD ???
|
|
5172
|
+ SERIAL_PROTOCOLPAIR(".Height:", DELTA_HEIGHT + home_offset[Z_AXIS]);
|
|
5173
|
+ if (end_stops) {
|
|
5174
|
+ print_signed_float(PSTR(" Ex"), endstop_adj[A_AXIS]);
|
|
5175
|
+ print_signed_float(PSTR("Ey"), endstop_adj[B_AXIS]);
|
|
5176
|
+ print_signed_float(PSTR("Ez"), endstop_adj[C_AXIS]);
|
|
5177
|
+ SERIAL_PROTOCOLPAIR(" Radius:", delta_radius);
|
|
5178
|
+ }
|
|
5179
|
+ SERIAL_EOL();
|
|
5180
|
+ if (tower_angles) {
|
|
5181
|
+ SERIAL_PROTOCOLPGM(".Tower angle : ");
|
|
5182
|
+ print_signed_float(PSTR("Tx"), delta_tower_angle_trim[A_AXIS]);
|
|
5183
|
+ print_signed_float(PSTR("Ty"), delta_tower_angle_trim[B_AXIS]);
|
|
5184
|
+ SERIAL_PROTOCOLLNPGM(" Tz:+0.00");
|
|
5185
|
+ }
|
|
5186
|
+ }
|
|
5187
|
+
|
5171
|
5188
|
inline void gcode_G33() {
|
5172
|
5189
|
|
5173
|
5190
|
const int8_t probe_points = parser.intval('P', DELTA_CALIBRATION_DEFAULT_POINTS);
|
5174
|
5191
|
if (!WITHIN(probe_points, 1, 7)) {
|
5175
|
|
- SERIAL_PROTOCOLLNPGM("?(P)oints is implausible (1 to 7).");
|
|
5192
|
+ SERIAL_PROTOCOLLNPGM("?(P)oints is implausible (1-7).");
|
5176
|
5193
|
return;
|
5177
|
5194
|
}
|
5178
|
5195
|
|
|
@@ -5256,26 +5273,13 @@ void home_all_axes() { gcode_G28(true); }
|
5256
|
5273
|
|
5257
|
5274
|
// print settings
|
5258
|
5275
|
|
5259
|
|
- SERIAL_PROTOCOLPGM("Checking... AC");
|
|
5276
|
+ const char *checkingac = PSTR("Checking... AC"); // TODO: Make translatable string
|
|
5277
|
+ serialprintPGM(checkingac);
|
5260
|
5278
|
if (verbose_level == 0) SERIAL_PROTOCOLPGM(" (DRY-RUN)");
|
5261
|
5279
|
SERIAL_EOL();
|
5262
|
|
- LCD_MESSAGEPGM("Checking... AC"); // TODO: Make translatable string
|
|
5280
|
+ lcd_setstatusPGM(checkingac);
|
5263
|
5281
|
|
5264
|
|
- SERIAL_PROTOCOLPAIR(".Height:", DELTA_HEIGHT + home_offset[Z_AXIS]);
|
5265
|
|
- if (!_1p_calibration) {
|
5266
|
|
- print_signed_float(PSTR(" Ex"), endstop_adj[A_AXIS]);
|
5267
|
|
- print_signed_float(PSTR("Ey"), endstop_adj[B_AXIS]);
|
5268
|
|
- print_signed_float(PSTR("Ez"), endstop_adj[C_AXIS]);
|
5269
|
|
- SERIAL_PROTOCOLPAIR(" Radius:", delta_radius);
|
5270
|
|
- }
|
5271
|
|
- SERIAL_EOL();
|
5272
|
|
- if (_7p_calibration && towers_set) {
|
5273
|
|
- SERIAL_PROTOCOLPGM(".Tower angle : ");
|
5274
|
|
- print_signed_float(PSTR("Tx"), delta_tower_angle_trim[A_AXIS]);
|
5275
|
|
- print_signed_float(PSTR("Ty"), delta_tower_angle_trim[B_AXIS]);
|
5276
|
|
- SERIAL_PROTOCOLPGM(" Tz:+0.00");
|
5277
|
|
- SERIAL_EOL();
|
5278
|
|
- }
|
|
5282
|
+ print_G33_settings(!_1p_calibration, _7p_calibration && towers_set);
|
5279
|
5283
|
|
5280
|
5284
|
#if DISABLED(PROBE_MANUALLY)
|
5281
|
5285
|
home_offset[Z_AXIS] -= probe_pt(dx, dy, stow_after_each, 1, false); // 1st probe to set height
|
|
@@ -5345,7 +5349,6 @@ void home_all_axes() { gcode_G28(true); }
|
5345
|
5349
|
N++;
|
5346
|
5350
|
}
|
5347
|
5351
|
zero_std_dev_old = zero_std_dev;
|
5348
|
|
- NOMORE(zero_std_dev_min, zero_std_dev);
|
5349
|
5352
|
zero_std_dev = round(sqrt(S2 / N) * 1000.0) / 1000.0 + 0.00001;
|
5350
|
5353
|
|
5351
|
5354
|
// Solve matrices
|
|
@@ -5436,8 +5439,9 @@ void home_all_axes() { gcode_G28(true); }
|
5436
|
5439
|
|
5437
|
5440
|
recalc_delta_settings(delta_radius, delta_diagonal_rod);
|
5438
|
5441
|
}
|
|
5442
|
+ NOMORE(zero_std_dev_min, zero_std_dev);
|
5439
|
5443
|
|
5440
|
|
- // print report
|
|
5444
|
+ // print report
|
5441
|
5445
|
|
5442
|
5446
|
if (verbose_level != 1) {
|
5443
|
5447
|
SERIAL_PROTOCOLPGM(". ");
|
|
@@ -5470,47 +5474,51 @@ void home_all_axes() { gcode_G28(true); }
|
5470
|
5474
|
#endif
|
5471
|
5475
|
{
|
5472
|
5476
|
SERIAL_PROTOCOLPGM("std dev:");
|
5473
|
|
- SERIAL_PROTOCOL_F(zero_std_dev, 3);
|
|
5477
|
+ SERIAL_PROTOCOL_F(zero_std_dev_min, 3);
|
5474
|
5478
|
}
|
5475
|
5479
|
SERIAL_EOL();
|
5476
|
|
- LCD_MESSAGEPGM("Calibration OK"); // TODO: Make translatable string
|
|
5480
|
+ char mess[21];
|
|
5481
|
+ sprintf_P(mess, PSTR("Calibration sd:"));
|
|
5482
|
+ if (zero_std_dev_min < 1)
|
|
5483
|
+ sprintf_P(&mess[15], PSTR("0.%03i"), (int)round(zero_std_dev_min * 1000.0));
|
|
5484
|
+ else
|
|
5485
|
+ sprintf_P(&mess[15], PSTR("%03i.x"), (int)round(zero_std_dev_min));
|
|
5486
|
+ lcd_setstatus(mess);
|
|
5487
|
+ print_G33_settings(!_1p_calibration, _7p_calibration && towers_set);
|
|
5488
|
+ serialprintPGM(save_message);
|
|
5489
|
+ SERIAL_EOL();
|
5477
|
5490
|
}
|
5478
|
5491
|
else { // !end iterations
|
5479
|
|
- char mess[15] = "No convergence";
|
|
5492
|
+ char mess[15];
|
5480
|
5493
|
if (iterations < 31)
|
5481
|
5494
|
sprintf_P(mess, PSTR("Iteration : %02i"), (int)iterations);
|
|
5495
|
+ else
|
|
5496
|
+ sprintf_P(mess, PSTR("No convergence"));
|
5482
|
5497
|
SERIAL_PROTOCOL(mess);
|
5483
|
5498
|
SERIAL_PROTOCOL_SP(36);
|
5484
|
5499
|
SERIAL_PROTOCOLPGM("std dev:");
|
5485
|
5500
|
SERIAL_PROTOCOL_F(zero_std_dev, 3);
|
5486
|
5501
|
SERIAL_EOL();
|
5487
|
5502
|
lcd_setstatus(mess);
|
|
5503
|
+ print_G33_settings(!_1p_calibration, _7p_calibration && towers_set);
|
5488
|
5504
|
}
|
5489
|
|
- SERIAL_PROTOCOLPAIR(".Height:", DELTA_HEIGHT + home_offset[Z_AXIS]);
|
5490
|
|
- if (!_1p_calibration) {
|
5491
|
|
- print_signed_float(PSTR(" Ex"), endstop_adj[A_AXIS]);
|
5492
|
|
- print_signed_float(PSTR("Ey"), endstop_adj[B_AXIS]);
|
5493
|
|
- print_signed_float(PSTR("Ez"), endstop_adj[C_AXIS]);
|
5494
|
|
- SERIAL_PROTOCOLPAIR(" Radius:", delta_radius);
|
5495
|
|
- }
|
5496
|
|
- SERIAL_EOL();
|
5497
|
|
- if (_7p_calibration && towers_set) {
|
5498
|
|
- SERIAL_PROTOCOLPGM(".Tower angle : ");
|
5499
|
|
- print_signed_float(PSTR("Tx"), delta_tower_angle_trim[A_AXIS]);
|
5500
|
|
- print_signed_float(PSTR("Ty"), delta_tower_angle_trim[B_AXIS]);
|
5501
|
|
- SERIAL_PROTOCOLPGM(" Tz:+0.00");
|
5502
|
|
- SERIAL_EOL();
|
5503
|
|
- }
|
5504
|
|
- if ((zero_std_dev >= test_precision || zero_std_dev <= calibration_precision) && iterations > force_iterations)
|
5505
|
|
- serialprintPGM(save_message);
|
5506
|
|
- SERIAL_EOL();
|
5507
|
5505
|
}
|
5508
|
5506
|
else { // dry run
|
5509
|
|
- SERIAL_PROTOCOLPGM("End DRY-RUN");
|
|
5507
|
+ const char *enddryrun = PSTR("End DRY-RUN");
|
|
5508
|
+ serialprintPGM(enddryrun);
|
5510
|
5509
|
SERIAL_PROTOCOL_SP(39);
|
5511
|
5510
|
SERIAL_PROTOCOLPGM("std dev:");
|
5512
|
5511
|
SERIAL_PROTOCOL_F(zero_std_dev, 3);
|
5513
|
5512
|
SERIAL_EOL();
|
|
5513
|
+
|
|
5514
|
+ char mess[21];
|
|
5515
|
+ sprintf_P(mess, enddryrun);
|
|
5516
|
+ sprintf_P(&mess[11], PSTR(" sd:"));
|
|
5517
|
+ if (zero_std_dev < 1)
|
|
5518
|
+ sprintf_P(&mess[15], PSTR("0.%03i"), (int)round(zero_std_dev * 1000.0));
|
|
5519
|
+ else
|
|
5520
|
+ sprintf_P(&mess[15], PSTR("%03i.x"), (int)round(zero_std_dev));
|
|
5521
|
+ lcd_setstatus(mess);
|
5514
|
5522
|
}
|
5515
|
5523
|
|
5516
|
5524
|
endstops.enable(true);
|