|
@@ -45,6 +45,7 @@
|
45
|
45
|
*
|
46
|
46
|
* Pn Number of probe points:
|
47
|
47
|
*
|
|
48
|
+ * P0 No probe. Normalize only.
|
48
|
49
|
* P1 Probe center and set height only.
|
49
|
50
|
* P2 Probe center and towers. Set height, endstops, and delta radius.
|
50
|
51
|
* P3 Probe all positions: center, towers and opposite towers. Set all.
|
|
@@ -73,7 +74,7 @@ static void print_signed_float(const char * const prefix, const float &f) {
|
73
|
74
|
SERIAL_PROTOCOL_F(f, 2);
|
74
|
75
|
}
|
75
|
76
|
|
76
|
|
-static void print_G33_settings(const bool end_stops, const bool tower_angles){ // TODO echo these to LCD ???
|
|
77
|
+static void print_G33_settings(const bool end_stops, const bool tower_angles) {
|
77
|
78
|
SERIAL_PROTOCOLPAIR(".Height:", DELTA_HEIGHT + home_offset[Z_AXIS]);
|
78
|
79
|
if (end_stops) {
|
79
|
80
|
print_signed_float(PSTR(" Ex"), delta_endstop_adj[A_AXIS]);
|
|
@@ -86,7 +87,8 @@ static void print_G33_settings(const bool end_stops, const bool tower_angles){ /
|
86
|
87
|
SERIAL_PROTOCOLPGM(".Tower angle : ");
|
87
|
88
|
print_signed_float(PSTR("Tx"), delta_tower_angle_trim[A_AXIS]);
|
88
|
89
|
print_signed_float(PSTR("Ty"), delta_tower_angle_trim[B_AXIS]);
|
89
|
|
- SERIAL_PROTOCOLLNPGM(" Tz:+0.00");
|
|
90
|
+ print_signed_float(PSTR("Tz"), delta_tower_angle_trim[C_AXIS]);
|
|
91
|
+ SERIAL_EOL();
|
90
|
92
|
}
|
91
|
93
|
}
|
92
|
94
|
|
|
@@ -108,8 +110,8 @@ static void G33_cleanup(
|
108
|
110
|
void GcodeSuite::G33() {
|
109
|
111
|
|
110
|
112
|
const int8_t probe_points = parser.intval('P', DELTA_CALIBRATION_DEFAULT_POINTS);
|
111
|
|
- if (!WITHIN(probe_points, 1, 7)) {
|
112
|
|
- SERIAL_PROTOCOLLNPGM("?(P)oints is implausible (1-7).");
|
|
113
|
+ if (!WITHIN(probe_points, 0, 7)) {
|
|
114
|
+ SERIAL_PROTOCOLLNPGM("?(P)oints is implausible (0-7).");
|
113
|
115
|
return;
|
114
|
116
|
}
|
115
|
117
|
|
|
@@ -132,11 +134,12 @@ void GcodeSuite::G33() {
|
132
|
134
|
}
|
133
|
135
|
|
134
|
136
|
const bool towers_set = parser.boolval('T', true),
|
|
137
|
+ _0p_calibration = probe_points == 0,
|
135
|
138
|
_1p_calibration = probe_points == 1,
|
136
|
139
|
_4p_calibration = probe_points == 2,
|
137
|
140
|
_4p_towers_points = _4p_calibration && towers_set,
|
138
|
141
|
_4p_opposite_points = _4p_calibration && !towers_set,
|
139
|
|
- _7p_calibration = probe_points >= 3,
|
|
142
|
+ _7p_calibration = probe_points >= 3 || _0p_calibration,
|
140
|
143
|
_7p_half_circle = probe_points == 3,
|
141
|
144
|
_7p_double_circle = probe_points == 5,
|
142
|
145
|
_7p_triple_circle = probe_points == 6,
|
|
@@ -157,17 +160,20 @@ void GcodeSuite::G33() {
|
157
|
160
|
zero_std_dev = (verbose_level ? 999.0 : 0.0), // 0.0 in dry-run mode : forced end
|
158
|
161
|
zero_std_dev_old = zero_std_dev,
|
159
|
162
|
zero_std_dev_min = zero_std_dev,
|
160
|
|
- e_old[XYZ] = {
|
|
163
|
+ e_old[ABC] = {
|
161
|
164
|
delta_endstop_adj[A_AXIS],
|
162
|
165
|
delta_endstop_adj[B_AXIS],
|
163
|
166
|
delta_endstop_adj[C_AXIS]
|
164
|
167
|
},
|
165
|
168
|
dr_old = delta_radius,
|
166
|
169
|
zh_old = home_offset[Z_AXIS],
|
167
|
|
- alpha_old = delta_tower_angle_trim[A_AXIS],
|
168
|
|
- beta_old = delta_tower_angle_trim[B_AXIS];
|
|
170
|
+ ta_old[ABC] = {
|
|
171
|
+ delta_tower_angle_trim[A_AXIS],
|
|
172
|
+ delta_tower_angle_trim[B_AXIS],
|
|
173
|
+ delta_tower_angle_trim[C_AXIS]
|
|
174
|
+ };
|
169
|
175
|
|
170
|
|
- if (!_1p_calibration) { // test if the outer radius is reachable
|
|
176
|
+ if (!_1p_calibration && !_0p_calibration) { // test if the outer radius is reachable
|
171
|
177
|
const float circles = (_7p_quadruple_circle ? 1.5 :
|
172
|
178
|
_7p_triple_circle ? 1.0 :
|
173
|
179
|
_7p_double_circle ? 0.5 : 0),
|
|
@@ -198,9 +204,11 @@ void GcodeSuite::G33() {
|
198
|
204
|
|
199
|
205
|
setup_for_endstop_or_probe_move();
|
200
|
206
|
endstops.enable(true);
|
201
|
|
- if (!home_delta())
|
202
|
|
- return;
|
203
|
|
- endstops.not_homing();
|
|
207
|
+ if (!_0p_calibration) {
|
|
208
|
+ if (!home_delta())
|
|
209
|
+ return;
|
|
210
|
+ endstops.not_homing();
|
|
211
|
+ }
|
204
|
212
|
|
205
|
213
|
// print settings
|
206
|
214
|
|
|
@@ -213,67 +221,71 @@ void GcodeSuite::G33() {
|
213
|
221
|
print_G33_settings(!_1p_calibration, _7p_calibration && towers_set);
|
214
|
222
|
|
215
|
223
|
#if DISABLED(PROBE_MANUALLY)
|
216
|
|
- const float measured_z = probe_pt(dx, dy, stow_after_each, 1, false); // 1st probe to set height
|
217
|
|
- if (isnan(measured_z)) return G33_CLEANUP();
|
218
|
|
- home_offset[Z_AXIS] -= measured_z;
|
|
224
|
+ if (!_0p_calibration) {
|
|
225
|
+ const float measured_z = probe_pt(dx, dy, stow_after_each, 1, false); // 1st probe to set height
|
|
226
|
+ if (isnan(measured_z)) return G33_CLEANUP();
|
|
227
|
+ home_offset[Z_AXIS] -= measured_z;
|
|
228
|
+ }
|
219
|
229
|
#endif
|
220
|
230
|
|
221
|
231
|
do {
|
222
|
232
|
|
223
|
233
|
float z_at_pt[13] = { 0.0 };
|
224
|
234
|
|
225
|
|
- test_precision = zero_std_dev_old != 999.0 ? (zero_std_dev + zero_std_dev_old) / 2 : zero_std_dev;
|
|
235
|
+ test_precision = _0p_calibration ? 0.00 : zero_std_dev_old != 999.0 ? (zero_std_dev + zero_std_dev_old) / 2 : zero_std_dev;
|
226
|
236
|
|
227
|
237
|
iterations++;
|
228
|
238
|
|
229
|
239
|
// Probe the points
|
230
|
240
|
|
231
|
|
- if (!_7p_half_circle && !_7p_triple_circle) { // probe the center
|
232
|
|
- #if ENABLED(PROBE_MANUALLY)
|
233
|
|
- z_at_pt[0] += lcd_probe_pt(0, 0);
|
234
|
|
- #else
|
235
|
|
- z_at_pt[0] += probe_pt(dx, dy, stow_after_each, 1, false);
|
236
|
|
- if (isnan(z_at_pt[0])) return G33_CLEANUP();
|
237
|
|
- #endif
|
238
|
|
- }
|
239
|
|
- if (_7p_calibration) { // probe extra center points
|
240
|
|
- for (int8_t axis = _7p_multi_circle ? 11 : 9; axis > 0; axis -= _7p_multi_circle ? 2 : 4) {
|
241
|
|
- const float a = RADIANS(180 + 30 * axis), r = delta_calibration_radius * 0.1;
|
|
241
|
+ if (!_0p_calibration){
|
|
242
|
+ if (!_7p_half_circle && !_7p_triple_circle) { // probe the center
|
242
|
243
|
#if ENABLED(PROBE_MANUALLY)
|
243
|
|
- z_at_pt[0] += lcd_probe_pt(cos(a) * r, sin(a) * r);
|
|
244
|
+ z_at_pt[0] += lcd_probe_pt(0, 0);
|
244
|
245
|
#else
|
245
|
|
- z_at_pt[0] += probe_pt(cos(a) * r + dx, sin(a) * r + dy, stow_after_each, 1);
|
|
246
|
+ z_at_pt[0] += probe_pt(dx, dy, stow_after_each, 1, false);
|
246
|
247
|
if (isnan(z_at_pt[0])) return G33_CLEANUP();
|
247
|
248
|
#endif
|
248
|
249
|
}
|
249
|
|
- z_at_pt[0] /= float(_7p_double_circle ? 7 : probe_points);
|
250
|
|
- }
|
251
|
|
- if (!_1p_calibration) { // probe the radius
|
252
|
|
- bool zig_zag = true;
|
253
|
|
- const uint8_t start = _4p_opposite_points ? 3 : 1,
|
254
|
|
- step = _4p_calibration ? 4 : _7p_half_circle ? 2 : 1;
|
255
|
|
- for (uint8_t axis = start; axis < 13; axis += step) {
|
256
|
|
- const float zigadd = (zig_zag ? 0.5 : 0.0),
|
257
|
|
- offset_circles = _7p_quadruple_circle ? zigadd + 1.0 :
|
258
|
|
- _7p_triple_circle ? zigadd + 0.5 :
|
259
|
|
- _7p_double_circle ? zigadd : 0;
|
260
|
|
- for (float circles = -offset_circles ; circles <= offset_circles; circles++) {
|
261
|
|
- const float a = RADIANS(180 + 30 * axis),
|
262
|
|
- r = delta_calibration_radius * (1 + circles * (zig_zag ? 0.1 : -0.1));
|
|
250
|
+ if (_7p_calibration) { // probe extra center points
|
|
251
|
+ for (int8_t axis = _7p_multi_circle ? 11 : 9; axis > 0; axis -= _7p_multi_circle ? 2 : 4) {
|
|
252
|
+ const float a = RADIANS(180 + 30 * axis), r = delta_calibration_radius * 0.1;
|
263
|
253
|
#if ENABLED(PROBE_MANUALLY)
|
264
|
|
- z_at_pt[axis] += lcd_probe_pt(cos(a) * r, sin(a) * r);
|
|
254
|
+ z_at_pt[0] += lcd_probe_pt(cos(a) * r, sin(a) * r);
|
265
|
255
|
#else
|
266
|
|
- z_at_pt[axis] += probe_pt(cos(a) * r + dx, sin(a) * r + dy, stow_after_each, 1);
|
267
|
|
- if (isnan(z_at_pt[axis])) return G33_CLEANUP();
|
|
256
|
+ z_at_pt[0] += probe_pt(cos(a) * r + dx, sin(a) * r + dy, stow_after_each, 1);
|
|
257
|
+ if (isnan(z_at_pt[0])) return G33_CLEANUP();
|
268
|
258
|
#endif
|
269
|
259
|
}
|
270
|
|
- zig_zag = !zig_zag;
|
271
|
|
- z_at_pt[axis] /= (2 * offset_circles + 1);
|
|
260
|
+ z_at_pt[0] /= float(_7p_double_circle ? 7 : probe_points);
|
|
261
|
+ }
|
|
262
|
+ if (!_1p_calibration) { // probe the radius
|
|
263
|
+ bool zig_zag = true;
|
|
264
|
+ const uint8_t start = _4p_opposite_points ? 3 : 1,
|
|
265
|
+ step = _4p_calibration ? 4 : _7p_half_circle ? 2 : 1;
|
|
266
|
+ for (uint8_t axis = start; axis < 13; axis += step) {
|
|
267
|
+ const float zigadd = (zig_zag ? 0.5 : 0.0),
|
|
268
|
+ offset_circles = _7p_quadruple_circle ? zigadd + 1.0 :
|
|
269
|
+ _7p_triple_circle ? zigadd + 0.5 :
|
|
270
|
+ _7p_double_circle ? zigadd : 0;
|
|
271
|
+ for (float circles = -offset_circles ; circles <= offset_circles; circles++) {
|
|
272
|
+ const float a = RADIANS(180 + 30 * axis),
|
|
273
|
+ r = delta_calibration_radius * (1 + circles * (zig_zag ? 0.1 : -0.1));
|
|
274
|
+ #if ENABLED(PROBE_MANUALLY)
|
|
275
|
+ z_at_pt[axis] += lcd_probe_pt(cos(a) * r, sin(a) * r);
|
|
276
|
+ #else
|
|
277
|
+ z_at_pt[axis] += probe_pt(cos(a) * r + dx, sin(a) * r + dy, stow_after_each, 1);
|
|
278
|
+ if (isnan(z_at_pt[axis])) return G33_CLEANUP();
|
|
279
|
+ #endif
|
|
280
|
+ }
|
|
281
|
+ zig_zag = !zig_zag;
|
|
282
|
+ z_at_pt[axis] /= (2 * offset_circles + 1);
|
|
283
|
+ }
|
272
|
284
|
}
|
|
285
|
+ if (_7p_intermed_points) // average intermediates to tower and opposites
|
|
286
|
+ for (uint8_t axis = 1; axis < 13; axis += 2)
|
|
287
|
+ z_at_pt[axis] = (z_at_pt[axis] + (z_at_pt[axis + 1] + z_at_pt[(axis + 10) % 12 + 1]) / 2.0) / 2.0;
|
273
|
288
|
}
|
274
|
|
- if (_7p_intermed_points) // average intermediates to tower and opposites
|
275
|
|
- for (uint8_t axis = 1; axis < 13; axis += 2)
|
276
|
|
- z_at_pt[axis] = (z_at_pt[axis] + (z_at_pt[axis + 1] + z_at_pt[(axis + 10) % 12 + 1]) / 2.0) / 2.0;
|
277
|
289
|
|
278
|
290
|
float S1 = z_at_pt[0],
|
279
|
291
|
S2 = sq(z_at_pt[0]);
|
|
@@ -294,27 +306,20 @@ void GcodeSuite::G33() {
|
294
|
306
|
COPY(e_old, delta_endstop_adj);
|
295
|
307
|
dr_old = delta_radius;
|
296
|
308
|
zh_old = home_offset[Z_AXIS];
|
297
|
|
- alpha_old = delta_tower_angle_trim[A_AXIS];
|
298
|
|
- beta_old = delta_tower_angle_trim[B_AXIS];
|
|
309
|
+ COPY(ta_old, delta_tower_angle_trim);
|
299
|
310
|
}
|
300
|
311
|
|
301
|
|
- float e_delta[XYZ] = { 0.0 }, r_delta = 0.0, t_alpha = 0.0, t_beta = 0.0;
|
|
312
|
+ float e_delta[ABC] = { 0.0 }, r_delta = 0.0, t_delta[ABC] = { 0.0 };
|
302
|
313
|
const float r_diff = delta_radius - delta_calibration_radius,
|
303
|
|
- h_factor = 1.00 + r_diff * 0.001, //1.02 for r_diff = 20mm
|
304
|
|
- r_factor = -(1.75 + 0.005 * r_diff + 0.001 * sq(r_diff)), //2.25 for r_diff = 20mm
|
305
|
|
- a_factor = 100.0 / delta_calibration_radius; //1.25 for cal_rd = 80mm
|
|
314
|
+ h_factor = (1.00 + r_diff * 0.001) / 6.0, //1.02 / 6 for r_diff = 20mm
|
|
315
|
+ r_factor = -(1.75 + 0.005 * r_diff + 0.001 * sq(r_diff)) / 6.0, //2.25 / 6 for r_diff = 20mm
|
|
316
|
+ a_factor = 66.66 / delta_calibration_radius; //1.25 for cal_rd = 80mm
|
306
|
317
|
|
307
|
318
|
#define ZP(N,I) ((N) * z_at_pt[I])
|
308
|
|
- #define Z1000(I) ZP(1.00, I)
|
309
|
|
- #define Z1050(I) ZP(h_factor, I)
|
310
|
|
- #define Z0700(I) ZP(h_factor * 2.0 / 3.00, I)
|
311
|
|
- #define Z0350(I) ZP(h_factor / 3.00, I)
|
312
|
|
- #define Z0175(I) ZP(h_factor / 6.00, I)
|
313
|
|
- #define Z2250(I) ZP(r_factor, I)
|
314
|
|
- #define Z0750(I) ZP(r_factor / 3.00, I)
|
315
|
|
- #define Z0375(I) ZP(r_factor / 6.00, I)
|
316
|
|
- #define Z0444(I) ZP(a_factor * 4.0 / 9.0, I)
|
317
|
|
- #define Z0888(I) ZP(a_factor * 8.0 / 9.0, I)
|
|
319
|
+ #define Z6(I) ZP(6, I)
|
|
320
|
+ #define Z4(I) ZP(4, I)
|
|
321
|
+ #define Z2(I) ZP(2, I)
|
|
322
|
+ #define Z1(I) ZP(1, I)
|
318
|
323
|
|
319
|
324
|
#if ENABLED(PROBE_MANUALLY)
|
320
|
325
|
test_precision = 0.00; // forced end
|
|
@@ -323,58 +328,60 @@ void GcodeSuite::G33() {
|
323
|
328
|
switch (probe_points) {
|
324
|
329
|
case 1:
|
325
|
330
|
test_precision = 0.00; // forced end
|
326
|
|
- LOOP_XYZ(i) e_delta[i] = Z1000(0);
|
|
331
|
+ LOOP_XYZ(axis) e_delta[axis] = Z1(0);
|
327
|
332
|
break;
|
328
|
333
|
|
329
|
334
|
case 2:
|
330
|
335
|
if (towers_set) {
|
331
|
|
- e_delta[X_AXIS] = Z1050(0) + Z0700(1) - Z0350(5) - Z0350(9);
|
332
|
|
- e_delta[Y_AXIS] = Z1050(0) - Z0350(1) + Z0700(5) - Z0350(9);
|
333
|
|
- e_delta[Z_AXIS] = Z1050(0) - Z0350(1) - Z0350(5) + Z0700(9);
|
334
|
|
- r_delta = Z2250(0) - Z0750(1) - Z0750(5) - Z0750(9);
|
|
336
|
+ e_delta[A_AXIS] = (Z6(0) + Z4(1) - Z2(5) - Z2(9)) * h_factor;
|
|
337
|
+ e_delta[B_AXIS] = (Z6(0) - Z2(1) + Z4(5) - Z2(9)) * h_factor;
|
|
338
|
+ e_delta[C_AXIS] = (Z6(0) - Z2(1) - Z2(5) + Z4(9)) * h_factor;
|
|
339
|
+ r_delta = (Z6(0) - Z2(1) - Z2(5) - Z2(9)) * r_factor;
|
335
|
340
|
}
|
336
|
341
|
else {
|
337
|
|
- e_delta[X_AXIS] = Z1050(0) - Z0700(7) + Z0350(11) + Z0350(3);
|
338
|
|
- e_delta[Y_AXIS] = Z1050(0) + Z0350(7) - Z0700(11) + Z0350(3);
|
339
|
|
- e_delta[Z_AXIS] = Z1050(0) + Z0350(7) + Z0350(11) - Z0700(3);
|
340
|
|
- r_delta = Z2250(0) - Z0750(7) - Z0750(11) - Z0750(3);
|
|
342
|
+ e_delta[A_AXIS] = (Z6(0) - Z4(7) + Z2(11) + Z2(3)) * h_factor;
|
|
343
|
+ e_delta[B_AXIS] = (Z6(0) + Z2(7) - Z4(11) + Z2(3)) * h_factor;
|
|
344
|
+ e_delta[C_AXIS] = (Z6(0) + Z2(7) + Z2(11) - Z4(3)) * h_factor;
|
|
345
|
+ r_delta = (Z6(0) - Z2(7) - Z2(11) - Z2(3)) * r_factor;
|
341
|
346
|
}
|
342
|
347
|
break;
|
343
|
348
|
|
344
|
349
|
default:
|
345
|
|
- e_delta[X_AXIS] = Z1050(0) + Z0350(1) - Z0175(5) - Z0175(9) - Z0350(7) + Z0175(11) + Z0175(3);
|
346
|
|
- e_delta[Y_AXIS] = Z1050(0) - Z0175(1) + Z0350(5) - Z0175(9) + Z0175(7) - Z0350(11) + Z0175(3);
|
347
|
|
- e_delta[Z_AXIS] = Z1050(0) - Z0175(1) - Z0175(5) + Z0350(9) + Z0175(7) + Z0175(11) - Z0350(3);
|
348
|
|
- r_delta = Z2250(0) - Z0375(1) - Z0375(5) - Z0375(9) - Z0375(7) - Z0375(11) - Z0375(3);
|
|
350
|
+ e_delta[A_AXIS] = (Z6(0) + Z2(1) - Z1(5) - Z1(9) - Z2(7) + Z1(11) + Z1(3)) * h_factor;
|
|
351
|
+ e_delta[B_AXIS] = (Z6(0) - Z1(1) + Z2(5) - Z1(9) + Z1(7) - Z2(11) + Z1(3)) * h_factor;
|
|
352
|
+ e_delta[C_AXIS] = (Z6(0) - Z1(1) - Z1(5) + Z2(9) + Z1(7) + Z1(11) - Z2(3)) * h_factor;
|
|
353
|
+ r_delta = (Z6(0) - Z1(1) - Z1(5) - Z1(9) - Z1(7) - Z1(11) - Z1(3)) * r_factor;
|
349
|
354
|
|
350
|
355
|
if (towers_set) {
|
351
|
|
- t_alpha = Z0444(1) - Z0888(5) + Z0444(9) + Z0444(7) - Z0888(11) + Z0444(3);
|
352
|
|
- t_beta = Z0888(1) - Z0444(5) - Z0444(9) + Z0888(7) - Z0444(11) - Z0444(3);
|
|
356
|
+ t_delta[A_AXIS] = ( - Z2(5) + Z1(9) - Z2(11) + Z1(3)) * a_factor;
|
|
357
|
+ t_delta[B_AXIS] = ( Z2(1) - Z1(9) + Z2(7) - Z1(3)) * a_factor;
|
|
358
|
+ t_delta[C_AXIS] = ( -Z2(1) + Z1(5) - Z2(7) + Z1(11) ) * a_factor;
|
353
|
359
|
}
|
354
|
360
|
break;
|
355
|
361
|
}
|
356
|
362
|
|
357
|
363
|
LOOP_XYZ(axis) delta_endstop_adj[axis] += e_delta[axis];
|
358
|
364
|
delta_radius += r_delta;
|
359
|
|
- delta_tower_angle_trim[A_AXIS] += t_alpha;
|
360
|
|
- delta_tower_angle_trim[B_AXIS] += t_beta;
|
361
|
|
-
|
362
|
|
- // adjust delta_height and endstops by the max amount
|
363
|
|
- const float z_temp = MAX3(delta_endstop_adj[A_AXIS], delta_endstop_adj[B_AXIS], delta_endstop_adj[C_AXIS]);
|
364
|
|
- home_offset[Z_AXIS] -= z_temp;
|
365
|
|
- LOOP_XYZ(i) delta_endstop_adj[i] -= z_temp;
|
366
|
|
-
|
367
|
|
- recalc_delta_settings(delta_radius, delta_diagonal_rod);
|
|
365
|
+ LOOP_XYZ(axis) delta_tower_angle_trim[axis] += t_delta[axis];
|
368
|
366
|
}
|
369
|
367
|
else if (zero_std_dev >= test_precision) { // step one back
|
370
|
368
|
COPY(delta_endstop_adj, e_old);
|
371
|
369
|
delta_radius = dr_old;
|
372
|
370
|
home_offset[Z_AXIS] = zh_old;
|
373
|
|
- delta_tower_angle_trim[A_AXIS] = alpha_old;
|
374
|
|
- delta_tower_angle_trim[B_AXIS] = beta_old;
|
375
|
|
-
|
376
|
|
- recalc_delta_settings(delta_radius, delta_diagonal_rod);
|
|
371
|
+ COPY(delta_tower_angle_trim, ta_old);
|
|
372
|
+ }
|
|
373
|
+ if (verbose_level != 0) { // !dry run
|
|
374
|
+ // normalise angles to least squares
|
|
375
|
+ float a_sum = 0.0;
|
|
376
|
+ LOOP_XYZ(axis) a_sum += delta_tower_angle_trim[axis];
|
|
377
|
+ LOOP_XYZ(axis) delta_tower_angle_trim[axis] -= a_sum / 3.0;
|
|
378
|
+
|
|
379
|
+ // adjust delta_height and endstops by the max amount
|
|
380
|
+ const float z_temp = MAX3(delta_endstop_adj[A_AXIS], delta_endstop_adj[B_AXIS], delta_endstop_adj[C_AXIS]);
|
|
381
|
+ home_offset[Z_AXIS] -= z_temp;
|
|
382
|
+ LOOP_XYZ(axis) delta_endstop_adj[axis] -= z_temp;
|
377
|
383
|
}
|
|
384
|
+ recalc_delta_settings(delta_radius, delta_diagonal_rod, delta_tower_angle_trim);
|
378
|
385
|
NOMORE(zero_std_dev_min, zero_std_dev);
|
379
|
386
|
|
380
|
387
|
// print report
|