|
@@ -155,7 +155,7 @@ static float probe_G33_points(float z_at_pt[NPP + 1], const int8_t probe_points,
|
155
|
155
|
dy = (Y_PROBE_OFFSET_FROM_EXTRUDER);
|
156
|
156
|
#endif
|
157
|
157
|
|
158
|
|
- LOOP_CAL_ALL(axis) z_at_pt[axis] = 0.0;
|
|
158
|
+ LOOP_CAL_ALL(axis) z_at_pt[axis] = 0.0;
|
159
|
159
|
|
160
|
160
|
if (!_0p_calibration) {
|
161
|
161
|
|
|
@@ -199,30 +199,23 @@ static float probe_G33_points(float z_at_pt[NPP + 1], const int8_t probe_points,
|
199
|
199
|
for (int8_t circle = -offset; circle <= offset; circle++) {
|
200
|
200
|
const float a = RADIANS(210 + (360 / NPP) * (axis - 1)),
|
201
|
201
|
r = delta_calibration_radius * (1 + 0.1 * (zig_zag ? circle : - circle)),
|
202
|
|
- interpol = fmod(axis, 1);
|
203
|
|
- #if ENABLED(PROBE_MANUALLY)
|
204
|
|
- float z_temp = lcd_probe_pt(cos(a) * r, sin(a) * r);
|
205
|
|
- #else
|
206
|
|
- float z_temp = probe_pt(cos(a) * r + dx, sin(a) * r + dy, stow_after_each, 1);
|
207
|
|
- #endif
|
|
202
|
+ interpol = FMOD(axis, 1);
|
|
203
|
+ const float z_temp =
|
|
204
|
+ #if ENABLED(PROBE_MANUALLY)
|
|
205
|
+ lcd_probe_pt(cos(a) * r, sin(a) * r)
|
|
206
|
+ #else
|
|
207
|
+ probe_pt(cos(a) * r + dx, sin(a) * r + dy, stow_after_each, 1)
|
|
208
|
+ #endif
|
|
209
|
+ ;
|
208
|
210
|
// split probe point to neighbouring calibration points
|
209
|
|
- z_at_pt[round(axis - interpol + NPP - 1) % NPP + 1] += z_temp * sq(cos(RADIANS(interpol * 90)));
|
210
|
|
- z_at_pt[round(axis - interpol) % NPP + 1] += z_temp * sq(sin(RADIANS(interpol * 90)));
|
|
211
|
+ z_at_pt[uint8_t(round(axis - interpol + NPP - 1)) % NPP + 1] += z_temp * sq(cos(RADIANS(interpol * 90)));
|
|
212
|
+ z_at_pt[uint8_t(round(axis - interpol)) % NPP + 1] += z_temp * sq(sin(RADIANS(interpol * 90)));
|
211
|
213
|
}
|
212
|
214
|
zig_zag = !zig_zag;
|
213
|
215
|
}
|
214
|
216
|
if (_7p_intermed_points)
|
215
|
|
- LOOP_CAL_RAD(axis) {
|
216
|
|
-/*
|
217
|
|
- // average intermediate points to towers and opposites - only required with _7P_STEP >= 2
|
218
|
|
- for (int8_t i = 1; i < _7P_STEP; i++) {
|
219
|
|
- const float interpol = i * (1.0 / _7P_STEP);
|
220
|
|
- z_at_pt[axis] += (z_at_pt[(axis + NPP - i - 1) % NPP + 1]
|
221
|
|
- + z_at_pt[axis + i]) * sq(cos(RADIANS(interpol * 90)));
|
222
|
|
- }
|
223
|
|
-*/
|
224
|
|
- z_at_pt[axis] /= _7P_STEP / steps;
|
225
|
|
- }
|
|
217
|
+ LOOP_CAL_RAD(axis)
|
|
218
|
+ z_at_pt[axis] /= _7P_STEP / steps;
|
226
|
219
|
}
|
227
|
220
|
|
228
|
221
|
|
|
@@ -342,14 +335,14 @@ static float probe_G33_points(float z_at_pt[NPP + 1], const int8_t probe_points,
|
342
|
335
|
recalc_delta_settings(delta_radius, delta_diagonal_rod, delta_tower_angle_trim);
|
343
|
336
|
switch (axis) {
|
344
|
337
|
case A_AXIS :
|
345
|
|
- a_fac += 4.0 / ( Z06(__B) -Z06(__C) +Z06(_CA) -Z06(_AB)); // Offset by alpha tower angle
|
346
|
|
- break;
|
|
338
|
+ a_fac += 4.0 / ( Z06(__B) -Z06(__C) +Z06(_CA) -Z06(_AB)); // Offset by alpha tower angle
|
|
339
|
+ break;
|
347
|
340
|
case B_AXIS :
|
348
|
|
- a_fac += 4.0 / (-Z06(__A) +Z06(__C) -Z06(_BC) +Z06(_AB)); // Offset by beta tower angle
|
349
|
|
- break;
|
|
341
|
+ a_fac += 4.0 / (-Z06(__A) +Z06(__C) -Z06(_BC) +Z06(_AB)); // Offset by beta tower angle
|
|
342
|
+ break;
|
350
|
343
|
case C_AXIS :
|
351
|
|
- a_fac += 4.0 / (Z06(__A) -Z06(__B) +Z06(_BC) -Z06(_CA) ); // Offset by gamma tower angle
|
352
|
|
- break;
|
|
344
|
+ a_fac += 4.0 / (Z06(__A) -Z06(__B) +Z06(_BC) -Z06(_CA) ); // Offset by gamma tower angle
|
|
345
|
+ break;
|
353
|
346
|
}
|
354
|
347
|
}
|
355
|
348
|
a_fac /= 3.0;
|