|
@@ -61,7 +61,7 @@
|
61
|
61
|
* G30 - Single Z probe, probes bed at X Y location (defaults to current XY location)
|
62
|
62
|
* G31 - Dock sled (Z_PROBE_SLED only)
|
63
|
63
|
* G32 - Undock sled (Z_PROBE_SLED only)
|
64
|
|
- * G33 - Delta '4-point' auto calibration iteration
|
|
64
|
+ * G33 - Delta '1-4-7-point' auto calibration : "G33 V<verbose> P<points> <A> <O> <T>" (Requires DELTA)
|
65
|
65
|
* G38 - Probe target - similar to G28 except it uses the Z_MIN_PROBE for all three axes
|
66
|
66
|
* G90 - Use Absolute Coordinates
|
67
|
67
|
* G91 - Use Relative Coordinates
|
|
@@ -585,10 +585,10 @@ static uint8_t target_extruder;
|
585
|
585
|
// These values are loaded or reset at boot time when setup() calls
|
586
|
586
|
// settings.load(), which calls recalc_delta_settings().
|
587
|
587
|
float delta_radius,
|
588
|
|
- delta_tower_angle_trim[ABC],
|
|
588
|
+ delta_tower_angle_trim[2],
|
589
|
589
|
delta_tower[ABC][2],
|
590
|
590
|
delta_diagonal_rod,
|
591
|
|
- delta_diagonal_rod_trim[ABC],
|
|
591
|
+ delta_calibration_radius,
|
592
|
592
|
delta_diagonal_rod_2_tower[ABC],
|
593
|
593
|
delta_segments_per_second,
|
594
|
594
|
delta_clip_start_height = Z_MAX_POS;
|
|
@@ -1830,6 +1830,9 @@ static void clean_up_after_endstop_or_probe_move() {
|
1830
|
1830
|
|
1831
|
1831
|
float z_dest = LOGICAL_Z_POSITION(z_raise);
|
1832
|
1832
|
if (zprobe_zoffset < 0) z_dest -= zprobe_zoffset;
|
|
1833
|
+ #if ENABLED(DELTA)
|
|
1834
|
+ z_dest -= home_offset[Z_AXIS];
|
|
1835
|
+ #endif
|
1833
|
1836
|
|
1834
|
1837
|
if (z_dest > current_position[Z_AXIS])
|
1835
|
1838
|
do_blocking_move_to_z(z_dest);
|
|
@@ -1837,7 +1840,8 @@ static void clean_up_after_endstop_or_probe_move() {
|
1837
|
1840
|
|
1838
|
1841
|
#endif //HAS_BED_PROBE
|
1839
|
1842
|
|
1840
|
|
-#if ENABLED(Z_PROBE_ALLEN_KEY) || ENABLED(Z_PROBE_SLED) || HAS_PROBING_PROCEDURE || HOTENDS > 1 || ENABLED(NOZZLE_CLEAN_FEATURE) || ENABLED(NOZZLE_PARK_FEATURE)
|
|
1843
|
+#if HAS_PROBING_PROCEDURE || HOTENDS > 1 || ENABLED(Z_PROBE_ALLEN_KEY) || ENABLED(Z_PROBE_SLED) || ENABLED(NOZZLE_CLEAN_FEATURE) || ENABLED(NOZZLE_PARK_FEATURE) || ENABLED(DELTA_AUTO_CALIBRATION)
|
|
1844
|
+
|
1841
|
1845
|
bool axis_unhomed_error(const bool x, const bool y, const bool z) {
|
1842
|
1846
|
const bool xx = x && !axis_homed[X_AXIS],
|
1843
|
1847
|
yy = y && !axis_homed[Y_AXIS],
|
|
@@ -1857,6 +1861,7 @@ static void clean_up_after_endstop_or_probe_move() {
|
1857
|
1861
|
}
|
1858
|
1862
|
return false;
|
1859
|
1863
|
}
|
|
1864
|
+
|
1860
|
1865
|
#endif
|
1861
|
1866
|
|
1862
|
1867
|
#if ENABLED(Z_PROBE_SLED)
|
|
@@ -2308,6 +2313,9 @@ static void clean_up_after_endstop_or_probe_move() {
|
2308
|
2313
|
// move down quickly before doing the slow probe
|
2309
|
2314
|
float z = LOGICAL_Z_POSITION(Z_CLEARANCE_BETWEEN_PROBES);
|
2310
|
2315
|
if (zprobe_zoffset < 0) z -= zprobe_zoffset;
|
|
2316
|
+ #if ENABLED(DELTA)
|
|
2317
|
+ z -= home_offset[Z_AXIS];
|
|
2318
|
+ #endif
|
2311
|
2319
|
if (z < current_position[Z_AXIS])
|
2312
|
2320
|
do_blocking_move_to_z(z, MMM_TO_MMS(Z_PROBE_SPEED_FAST));
|
2313
|
2321
|
|
|
@@ -5009,11 +5017,12 @@ inline void gcode_G28() {
|
5009
|
5017
|
|
5010
|
5018
|
/**
|
5011
|
5019
|
* G30: Do a single Z probe at the current XY
|
5012
|
|
- * Usage:
|
5013
|
|
- * G30 <X#> <Y#> <S#>
|
5014
|
|
- * X = Probe X position (default=current probe position)
|
5015
|
|
- * Y = Probe Y position (default=current probe position)
|
5016
|
|
- * S = Stows the probe if 1 (default=1)
|
|
5020
|
+ *
|
|
5021
|
+ * Parameters:
|
|
5022
|
+ *
|
|
5023
|
+ * X Probe X position (default current X)
|
|
5024
|
+ * Y Probe Y position (default current Y)
|
|
5025
|
+ * S0 Leave the probe deployed
|
5017
|
5026
|
*/
|
5018
|
5027
|
inline void gcode_G30() {
|
5019
|
5028
|
const float xpos = code_seen('X') ? code_value_linear_units() : current_position[X_AXIS] + X_PROBE_OFFSET_FROM_EXTRUDER,
|
|
@@ -5056,32 +5065,25 @@ inline void gcode_G28() {
|
5056
|
5065
|
|
5057
|
5066
|
#if ENABLED(DELTA_AUTO_CALIBRATION)
|
5058
|
5067
|
/**
|
5059
|
|
- * G33: Delta '4-point' auto calibration iteration
|
5060
|
|
- *
|
5061
|
|
- * Usage: G33 <Cn> <Vn>
|
5062
|
|
- *
|
5063
|
|
- * C (default) = Calibrate endstops, height and delta radius
|
5064
|
|
- *
|
5065
|
|
- * -2, 1-4: n x n probe points, default 3 x 3
|
5066
|
|
- *
|
5067
|
|
- * 1: probe center
|
5068
|
|
- * set height only - useful when z_offset is changed
|
5069
|
|
- * 2: probe center and towers
|
5070
|
|
- * solve one '4 point' calibration
|
5071
|
|
- * -2: probe center and opposite the towers
|
5072
|
|
- * solve one '4 point' calibration
|
5073
|
|
- * 3: probe 3 center points, towers and opposite-towers
|
5074
|
|
- * averages between 2 '4 point' calibrations
|
5075
|
|
- * 4: probe 4 center points, towers, opposite-towers and itermediate points
|
5076
|
|
- * averages between 4 '4 point' calibrations
|
5077
|
|
- *
|
5078
|
|
- * V Verbose level (0-3, default 1)
|
5079
|
|
- *
|
5080
|
|
- * 0: Dry-run mode: no calibration
|
5081
|
|
- * 1: Settings
|
5082
|
|
- * 2: Setting + probe results
|
5083
|
|
- * 3: Expert mode: setting + iteration factors (see Configuration_adv.h)
|
5084
|
|
- * This prematurely stops the iteration process when factors are found
|
|
5068
|
+ * G33 - Delta '1-4-7-point' auto calibration (Requires DELTA)
|
|
5069
|
+ *
|
|
5070
|
+ * Usage:
|
|
5071
|
+ * G33 <Vn> <Pn> <A> <O> <T>
|
|
5072
|
+ *
|
|
5073
|
+ * Vn = verbose level (n=0-2 default 1)
|
|
5074
|
+ * n=0 dry-run mode: setting + probe results / no calibration
|
|
5075
|
+ * n=1 settings
|
|
5076
|
+ * n=2 setting + probe results
|
|
5077
|
+ * Pn = n=-7 -> +7 : n*n probe points
|
|
5078
|
+ * calibrates height ('1 point'), endstops, and delta radius ('4 points')
|
|
5079
|
+ * and tower angles with n > 2 ('7+ points')
|
|
5080
|
+ * n=1 probes center / sets height only
|
|
5081
|
+ * n=2 probes center and towers / sets height, endstops and delta radius
|
|
5082
|
+ * n=3 probes all points: center, towers and opposite towers / sets all
|
|
5083
|
+ * n>3 probes all points multiple times and averages
|
|
5084
|
+ * A = abort 1 point delta height calibration after 1 probe
|
|
5085
|
+ * O = use oposite tower points instead of tower points with 4 point calibration
|
|
5086
|
+ * T = do not calibrate tower angles with 7+ point calibration
|
5085
|
5087
|
*/
|
5086
|
5088
|
inline void gcode_G33() {
|
5087
|
5089
|
|
|
@@ -5091,49 +5093,55 @@ inline void gcode_G28() {
|
5091
|
5093
|
set_bed_leveling_enabled(false);
|
5092
|
5094
|
#endif
|
5093
|
5095
|
|
5094
|
|
- const int8_t pp = code_seen('C') ? code_value_int() : DELTA_CALIBRATION_DEFAULT_POINTS,
|
5095
|
|
- probe_points = (WITHIN(pp, 1, 4) || pp == -2) ? pp : DELTA_CALIBRATION_DEFAULT_POINTS;
|
5096
|
|
-
|
5097
|
|
- int8_t verbose_level = code_seen('V') ? code_value_byte() : 1;
|
5098
|
|
-
|
5099
|
|
- #if ENABLED(DELTA_CALIBRATE_EXPERT_MODE)
|
5100
|
|
- #define _MAX_M33_V 3
|
5101
|
|
- if (verbose_level == 3 && probe_points == 1) verbose_level--; // needs at least 4 points
|
5102
|
|
- #else
|
5103
|
|
- #define _MAX_M33_V 2
|
5104
|
|
- if (verbose_level > 2)
|
5105
|
|
- SERIAL_PROTOCOLLNPGM("Enable DELTA_CALIBRATE_EXPERT_MODE in Configuration_adv.h");
|
5106
|
|
- #endif
|
|
5096
|
+ int8_t pp = (code_seen('P') ? code_value_int() : DELTA_CALIBRATION_DEFAULT_POINTS),
|
|
5097
|
+ probe_mode = (WITHIN(pp, 1, 7) ? pp : DELTA_CALIBRATION_DEFAULT_POINTS);
|
5107
|
5098
|
|
5108
|
|
- if (!WITHIN(verbose_level, 0, _MAX_M33_V)) verbose_level = 1;
|
|
5099
|
+ probe_mode = (code_seen('A') && probe_mode == 1 ? -probe_mode : probe_mode);
|
|
5100
|
+ probe_mode = (code_seen('O') && probe_mode == 2 ? -probe_mode : probe_mode);
|
|
5101
|
+ probe_mode = (code_seen('T') && probe_mode > 2 ? -probe_mode : probe_mode);
|
|
5102
|
+
|
|
5103
|
+ int8_t verbose_level = (code_seen('V') ? code_value_byte() : 1);
|
5109
|
5104
|
|
5110
|
|
- float zero_std_dev = verbose_level ? 999.0 : 0.0; // 0.0 in dry-run mode : forced end
|
|
5105
|
+ if (!WITHIN(verbose_level, 0, 2)) verbose_level = 1;
|
5111
|
5106
|
|
5112
|
5107
|
gcode_G28();
|
5113
|
5108
|
|
5114
|
|
- float e_old[XYZ],
|
|
5109
|
+ const static char save_message[] PROGMEM = "Save with M500 and/or copy to Configuration.h";
|
|
5110
|
+ float test_precision,
|
|
5111
|
+ zero_std_dev = (verbose_level ? 999.0 : 0.0), // 0.0 in dry-run mode : forced end
|
|
5112
|
+ e_old[XYZ] = {
|
|
5113
|
+ endstop_adj[A_AXIS],
|
|
5114
|
+ endstop_adj[B_AXIS],
|
|
5115
|
+ endstop_adj[C_AXIS]
|
|
5116
|
+ },
|
5115
|
5117
|
dr_old = delta_radius,
|
5116
|
|
- zh_old = home_offset[Z_AXIS];
|
5117
|
|
- COPY(e_old,endstop_adj);
|
5118
|
|
- #if ENABLED(DELTA_CALIBRATE_EXPERT_MODE)
|
5119
|
|
- // expert variables
|
5120
|
|
- float h_f_old = 1.00, r_f_old = 0.00,
|
5121
|
|
- h_diff_min = 1.00, r_diff_max = 0.10;
|
5122
|
|
- #endif
|
5123
|
|
-
|
|
5118
|
+ zh_old = home_offset[Z_AXIS],
|
|
5119
|
+ alpha_old = delta_tower_angle_trim[A_AXIS],
|
|
5120
|
+ beta_old = delta_tower_angle_trim[B_AXIS];
|
|
5121
|
+ int8_t iterations = 0,
|
|
5122
|
+ probe_points = abs(probe_mode);
|
|
5123
|
+ const bool pp_equals_1 = (probe_points == 1),
|
|
5124
|
+ pp_equals_2 = (probe_points == 2),
|
|
5125
|
+ pp_equals_3 = (probe_points == 3),
|
|
5126
|
+ pp_equals_4 = (probe_points == 4),
|
|
5127
|
+ pp_equals_5 = (probe_points == 5),
|
|
5128
|
+ pp_equals_6 = (probe_points == 6),
|
|
5129
|
+ pp_equals_7 = (probe_points == 7),
|
|
5130
|
+ pp_greather_2 = (probe_points > 2),
|
|
5131
|
+ pp_greather_3 = (probe_points > 3),
|
|
5132
|
+ pp_greather_4 = (probe_points > 4),
|
|
5133
|
+ pp_greather_5 = (probe_points > 5);
|
|
5134
|
+
|
5124
|
5135
|
// print settings
|
5125
|
5136
|
|
5126
|
5137
|
SERIAL_PROTOCOLLNPGM("G33 Auto Calibrate");
|
5127
|
5138
|
SERIAL_PROTOCOLPGM("Checking... AC");
|
5128
|
5139
|
if (verbose_level == 0) SERIAL_PROTOCOLPGM(" (DRY-RUN)");
|
5129
|
|
- #if ENABLED(DELTA_CALIBRATE_EXPERT_MODE)
|
5130
|
|
- if (verbose_level == 3) SERIAL_PROTOCOLPGM(" (EXPERT)");
|
5131
|
|
- #endif
|
5132
|
5140
|
SERIAL_EOL;
|
5133
|
5141
|
LCD_MESSAGEPGM("Checking... AC");
|
5134
|
5142
|
|
5135
|
|
- SERIAL_PROTOCOLPAIR("Height:", DELTA_HEIGHT + home_offset[Z_AXIS]);
|
5136
|
|
- if (abs(probe_points) > 1) {
|
|
5143
|
+ SERIAL_PROTOCOLPAIR(".Height:", DELTA_HEIGHT + home_offset[Z_AXIS]);
|
|
5144
|
+ if (!pp_equals_1) {
|
5137
|
5145
|
SERIAL_PROTOCOLPGM(" Ex:");
|
5138
|
5146
|
if (endstop_adj[A_AXIS] >= 0) SERIAL_CHAR('+');
|
5139
|
5147
|
SERIAL_PROTOCOL_F(endstop_adj[A_AXIS], 2);
|
|
@@ -5146,74 +5154,84 @@ inline void gcode_G28() {
|
5146
|
5154
|
SERIAL_PROTOCOLPAIR(" Radius:", delta_radius);
|
5147
|
5155
|
}
|
5148
|
5156
|
SERIAL_EOL;
|
|
5157
|
+ if (probe_mode > 2) { // negative disables tower angles
|
|
5158
|
+ SERIAL_PROTOCOLPGM(".Tower angle : Tx:");
|
|
5159
|
+ if (delta_tower_angle_trim[A_AXIS] >= 0) SERIAL_CHAR('+');
|
|
5160
|
+ SERIAL_PROTOCOL_F(delta_tower_angle_trim[A_AXIS], 2);
|
|
5161
|
+ SERIAL_PROTOCOLPGM(" Ty:");
|
|
5162
|
+ if (delta_tower_angle_trim[B_AXIS] >= 0) SERIAL_CHAR('+');
|
|
5163
|
+ SERIAL_PROTOCOL_F(delta_tower_angle_trim[B_AXIS], 2);
|
|
5164
|
+ SERIAL_PROTOCOLPGM(" Tz:+0.00");
|
|
5165
|
+ SERIAL_EOL;
|
|
5166
|
+ }
|
5149
|
5167
|
|
5150
|
5168
|
#if ENABLED(Z_PROBE_SLED)
|
5151
|
5169
|
DEPLOY_PROBE();
|
5152
|
5170
|
#endif
|
5153
|
5171
|
|
5154
|
|
- float test_precision;
|
5155
|
|
- int8_t iterations = 0;
|
5156
|
|
-
|
5157
|
|
- do { // start iterations
|
5158
|
|
-
|
5159
|
|
- setup_for_endstop_or_probe_move();
|
5160
|
|
-
|
5161
|
|
- test_precision =
|
5162
|
|
- #if ENABLED(DELTA_CALIBRATE_EXPERT_MODE)
|
5163
|
|
- // Expert mode : forced end at std_dev < 0.1
|
5164
|
|
- (verbose_level == 3 && zero_std_dev < 0.1) ? 0.0 :
|
5165
|
|
- #endif
|
5166
|
|
- zero_std_dev
|
5167
|
|
- ;
|
|
5172
|
+ do {
|
5168
|
5173
|
|
5169
|
|
- float z_at_pt[13] = { 0 };
|
|
5174
|
+ float z_at_pt[13] = { 0 },
|
|
5175
|
+ S1 = 0.0,
|
|
5176
|
+ S2 = 0.0;
|
|
5177
|
+ int16_t N = 0;
|
5170
|
5178
|
|
|
5179
|
+ test_precision = zero_std_dev;
|
5171
|
5180
|
iterations++;
|
5172
|
5181
|
|
5173
|
5182
|
// probe the points
|
5174
|
5183
|
|
5175
|
|
- int16_t center_points = 0;
|
5176
|
|
-
|
5177
|
|
- if (probe_points != 3) {
|
|
5184
|
+ if (!pp_equals_3 && !pp_equals_6) { // probe the centre
|
|
5185
|
+ setup_for_endstop_or_probe_move();
|
5178
|
5186
|
z_at_pt[0] += probe_pt(0.0, 0.0 , true, 1);
|
5179
|
|
- center_points = 1;
|
|
5187
|
+ clean_up_after_endstop_or_probe_move();
|
5180
|
5188
|
}
|
5181
|
|
-
|
5182
|
|
- int16_t step_axis = 4;
|
5183
|
|
- if (probe_points >= 3) {
|
5184
|
|
- for (int8_t axis = 9; axis > 0; axis -= step_axis) { // uint8_t starts endless loop
|
|
5189
|
+ if (pp_greather_2) { // probe extra centre points
|
|
5190
|
+ for (int8_t axis = (pp_greather_4 ? 11 : 9); axis > 0; axis -= (pp_greather_4 ? 2 : 4)) {
|
|
5191
|
+ setup_for_endstop_or_probe_move();
|
5185
|
5192
|
z_at_pt[0] += probe_pt(
|
5186
|
|
- 0.1 * cos(RADIANS(180 + 30 * axis)) * (DELTA_CALIBRATION_RADIUS),
|
5187
|
|
- 0.1 * sin(RADIANS(180 + 30 * axis)) * (DELTA_CALIBRATION_RADIUS), true, 1);
|
|
5193
|
+ cos(RADIANS(180 + 30 * axis)) * (0.1 * delta_calibration_radius),
|
|
5194
|
+ sin(RADIANS(180 + 30 * axis)) * (0.1 * delta_calibration_radius), true, 1);
|
|
5195
|
+ clean_up_after_endstop_or_probe_move();
|
5188
|
5196
|
}
|
5189
|
|
- center_points += 3;
|
5190
|
|
- z_at_pt[0] /= center_points;
|
|
5197
|
+ z_at_pt[0] /= (pp_equals_5 ? 7 : probe_points);
|
5191
|
5198
|
}
|
5192
|
|
-
|
5193
|
|
- float S1 = z_at_pt[0], S2 = sq(S1);
|
5194
|
|
-
|
5195
|
|
- int16_t N = 1, start = (probe_points == -2) ? 3 : 1;
|
5196
|
|
- step_axis = (abs(probe_points) == 2) ? 4 : (probe_points == 3) ? 2 : 1;
|
5197
|
|
-
|
5198
|
|
- if (probe_points != 1) {
|
5199
|
|
- for (uint8_t axis = start; axis < 13; axis += step_axis)
|
5200
|
|
- z_at_pt[axis] += probe_pt(
|
5201
|
|
- cos(RADIANS(180 + 30 * axis)) * (DELTA_CALIBRATION_RADIUS),
|
5202
|
|
- sin(RADIANS(180 + 30 * axis)) * (DELTA_CALIBRATION_RADIUS), true, 1
|
5203
|
|
- );
|
5204
|
|
-
|
5205
|
|
- if (probe_points == 4) step_axis = 2;
|
|
5199
|
+ if (!pp_equals_1) { // probe the radius
|
|
5200
|
+ float start_circles = (pp_equals_7 ? -1.5 : pp_equals_6 || pp_equals_5 ? -1 : 0),
|
|
5201
|
+ end_circles = -start_circles;
|
|
5202
|
+ bool zig_zag = true;
|
|
5203
|
+ for (uint8_t axis = (probe_mode == -2 ? 3 : 1); axis < 13;
|
|
5204
|
+ axis += (pp_equals_2 ? 4 : pp_equals_3 || pp_equals_5 ? 2 : 1)) {
|
|
5205
|
+ for (float circles = start_circles ; circles <= end_circles; circles++) {
|
|
5206
|
+ setup_for_endstop_or_probe_move();
|
|
5207
|
+ z_at_pt[axis] += probe_pt(
|
|
5208
|
+ cos(RADIANS(180 + 30 * axis)) *
|
|
5209
|
+ (1 + circles * 0.1 * (zig_zag ? 1 : -1)) * delta_calibration_radius,
|
|
5210
|
+ sin(RADIANS(180 + 30 * axis)) *
|
|
5211
|
+ (1 + circles * 0.1 * (zig_zag ? 1 : -1)) * delta_calibration_radius, true, 1);
|
|
5212
|
+ clean_up_after_endstop_or_probe_move();
|
|
5213
|
+ }
|
|
5214
|
+ start_circles += (pp_greather_5 ? (zig_zag ? 0.5 : -0.5) : 0);
|
|
5215
|
+ end_circles = -start_circles;
|
|
5216
|
+ zig_zag = !zig_zag;
|
|
5217
|
+ z_at_pt[axis] /= (pp_equals_7 ? (zig_zag ? 4.0 : 3.0) :
|
|
5218
|
+ pp_equals_6 ? (zig_zag ? 3.0 : 2.0) : pp_equals_5 ? 3 : 1);
|
|
5219
|
+ }
|
5206
|
5220
|
}
|
5207
|
|
-
|
5208
|
|
- for (uint8_t axis = start; axis < 13; axis += step_axis) {
|
5209
|
|
- if (probe_points == 4)
|
|
5221
|
+ if (pp_greather_3 && !pp_equals_5) // average intermediates to tower and opposites
|
|
5222
|
+ for (uint8_t axis = 1; axis < 13; axis += 2)
|
5210
|
5223
|
z_at_pt[axis] = (z_at_pt[axis] + (z_at_pt[axis + 1] + z_at_pt[(axis + 10) % 12 + 1]) / 2.0) / 2.0;
|
5211
|
5224
|
|
5212
|
|
- S1 += z_at_pt[axis];
|
5213
|
|
- S2 += sq(z_at_pt[axis]);
|
5214
|
|
- N++;
|
5215
|
|
- }
|
5216
|
|
- zero_std_dev = round(sqrt(S2 / N) * 1000.0) / 1000.0 + 0.00001; // deviation from zero plane
|
|
5225
|
+ S1 += z_at_pt[0];
|
|
5226
|
+ S2 += sq(z_at_pt[0]);
|
|
5227
|
+ N++;
|
|
5228
|
+ if (!pp_equals_1) // std dev from zero plane
|
|
5229
|
+ for (uint8_t axis = (probe_mode == -2 ? 3 : 1); axis < 13; axis += (pp_equals_2 ? 4 : 2)) {
|
|
5230
|
+ S1 += z_at_pt[axis];
|
|
5231
|
+ S2 += sq(z_at_pt[axis]);
|
|
5232
|
+ N++;
|
|
5233
|
+ }
|
|
5234
|
+ zero_std_dev = round(sqrt(S2 / N) * 1000.0) / 1000.0 + 0.00001;
|
5217
|
5235
|
|
5218
|
5236
|
// Solve matrices
|
5219
|
5237
|
|
|
@@ -5221,28 +5239,33 @@ inline void gcode_G28() {
|
5221
|
5239
|
COPY(e_old, endstop_adj);
|
5222
|
5240
|
dr_old = delta_radius;
|
5223
|
5241
|
zh_old = home_offset[Z_AXIS];
|
|
5242
|
+ alpha_old = delta_tower_angle_trim[A_AXIS];
|
|
5243
|
+ beta_old = delta_tower_angle_trim[B_AXIS];
|
5224
|
5244
|
|
5225
|
|
- float e_delta[XYZ] = { 0.0 }, r_delta = 0.0;
|
5226
|
|
-
|
5227
|
|
- #if ENABLED(DELTA_CALIBRATE_EXPERT_MODE)
|
5228
|
|
- float h_f_new = 0.0, r_f_new = 0.0 , t_f_new = 0.0,
|
5229
|
|
- h_diff = 0.00, r_diff = 0.00;
|
5230
|
|
- #endif
|
|
5245
|
+ float e_delta[XYZ] = { 0.0 }, r_delta = 0.0,
|
|
5246
|
+ t_alpha = 0.0, t_beta = 0.0;
|
|
5247
|
+ const float r_diff = delta_radius - delta_calibration_radius,
|
|
5248
|
+ h_factor = 1.00 + r_diff * 0.001, //1.02 for r_diff = 20mm
|
|
5249
|
+ r_factor = -(1.75 + 0.005 * r_diff + 0.001 * sq(r_diff)), //2.25 for r_diff = 20mm
|
|
5250
|
+ a_factor = 100.0 / delta_calibration_radius; //1.25 for cal_rd = 80mm
|
5231
|
5251
|
|
5232
|
5252
|
#define ZP(N,I) ((N) * z_at_pt[I])
|
5233
|
5253
|
#define Z1000(I) ZP(1.00, I)
|
5234
|
|
- #define Z1050(I) ZP(H_FACTOR, I)
|
5235
|
|
- #define Z0700(I) ZP((H_FACTOR) * 2.0 / 3.00, I)
|
5236
|
|
- #define Z0350(I) ZP((H_FACTOR) / 3.00, I)
|
5237
|
|
- #define Z0175(I) ZP((H_FACTOR) / 6.00, I)
|
5238
|
|
- #define Z2250(I) ZP(R_FACTOR, I)
|
5239
|
|
- #define Z0750(I) ZP((R_FACTOR) / 3.00, I)
|
5240
|
|
- #define Z0375(I) ZP((R_FACTOR) / 6.00, I)
|
5241
|
|
-
|
5242
|
|
- switch (probe_points) {
|
|
5254
|
+ #define Z1050(I) ZP(h_factor, I)
|
|
5255
|
+ #define Z0700(I) ZP(h_factor * 2.0 / 3.00, I)
|
|
5256
|
+ #define Z0350(I) ZP(h_factor / 3.00, I)
|
|
5257
|
+ #define Z0175(I) ZP(h_factor / 6.00, I)
|
|
5258
|
+ #define Z2250(I) ZP(r_factor, I)
|
|
5259
|
+ #define Z0750(I) ZP(r_factor / 3.00, I)
|
|
5260
|
+ #define Z0375(I) ZP(r_factor / 6.00, I)
|
|
5261
|
+ #define Z0444(I) ZP(a_factor * 4.0 / 9.0, I)
|
|
5262
|
+ #define Z0888(I) ZP(a_factor * 8.0 / 9.0, I)
|
|
5263
|
+
|
|
5264
|
+ switch (probe_mode) {
|
|
5265
|
+ case -1:
|
|
5266
|
+ test_precision = 0.00;
|
5243
|
5267
|
case 1:
|
5244
|
5268
|
LOOP_XYZ(i) e_delta[i] = Z1000(0);
|
5245
|
|
- r_delta = 0.00;
|
5246
|
5269
|
break;
|
5247
|
5270
|
|
5248
|
5271
|
case 2:
|
|
@@ -5264,67 +5287,43 @@ inline void gcode_G28() {
|
5264
|
5287
|
e_delta[Y_AXIS] = Z1050(0) - Z0175(1) + Z0350(5) - Z0175(9) + Z0175(7) - Z0350(11) + Z0175(3);
|
5265
|
5288
|
e_delta[Z_AXIS] = Z1050(0) - Z0175(1) - Z0175(5) + Z0350(9) + Z0175(7) + Z0175(11) - Z0350(3);
|
5266
|
5289
|
r_delta = Z2250(0) - Z0375(1) - Z0375(5) - Z0375(9) - Z0375(7) - Z0375(11) - Z0375(3);
|
|
5290
|
+
|
|
5291
|
+ if (probe_mode > 0) { // negative disables tower angles
|
|
5292
|
+ t_alpha = + Z0444(1) - Z0888(5) + Z0444(9) + Z0444(7) - Z0888(11) + Z0444(3);
|
|
5293
|
+ t_beta = - Z0888(1) + Z0444(5) + Z0444(9) - Z0888(7) + Z0444(11) + Z0444(3);
|
|
5294
|
+ }
|
5267
|
5295
|
break;
|
5268
|
5296
|
}
|
5269
|
5297
|
|
5270
|
|
- #if ENABLED(DELTA_CALIBRATE_EXPERT_MODE)
|
5271
|
|
- // Calculate h & r factors
|
5272
|
|
- if (verbose_level == 3) {
|
5273
|
|
- LOOP_XYZ(axis) h_f_new += e_delta[axis] / 3;
|
5274
|
|
- r_f_new = r_delta;
|
5275
|
|
- h_diff = (1.0 / H_FACTOR) * (h_f_old - h_f_new) / h_f_old;
|
5276
|
|
- if (h_diff < h_diff_min && h_diff > 0.9) h_diff_min = h_diff;
|
5277
|
|
- if (r_f_old != 0)
|
5278
|
|
- r_diff = ( 0.0301 * sq(R_FACTOR) * R_FACTOR
|
5279
|
|
- + 0.311 * sq(R_FACTOR)
|
5280
|
|
- + 1.1493 * R_FACTOR
|
5281
|
|
- + 1.7952
|
5282
|
|
- ) * (r_f_old - r_f_new) / r_f_old;
|
5283
|
|
- if (r_diff > r_diff_max && r_diff < 0.4444) r_diff_max = r_diff;
|
5284
|
|
- SERIAL_EOL;
|
5285
|
|
-
|
5286
|
|
- h_f_old = h_f_new;
|
5287
|
|
- r_f_old = r_f_new;
|
5288
|
|
- }
|
5289
|
|
- #endif // DELTA_CALIBRATE_EXPERT_MODE
|
5290
|
|
-
|
5291
|
|
- // Adjust delta_height and endstops by the max amount
|
5292
|
5298
|
LOOP_XYZ(axis) endstop_adj[axis] += e_delta[axis];
|
5293
|
5299
|
delta_radius += r_delta;
|
|
5300
|
+ delta_tower_angle_trim[A_AXIS] += t_alpha;
|
|
5301
|
+ delta_tower_angle_trim[B_AXIS] -= t_beta;
|
5294
|
5302
|
|
5295
|
|
- const float z_temp = MAX3(endstop_adj[0], endstop_adj[1], endstop_adj[2]);
|
|
5303
|
+ // adjust delta_height and endstops by the max amount
|
|
5304
|
+ const float z_temp = MAX3(endstop_adj[A_AXIS], endstop_adj[B_AXIS], endstop_adj[C_AXIS]);
|
5296
|
5305
|
home_offset[Z_AXIS] -= z_temp;
|
5297
|
5306
|
LOOP_XYZ(i) endstop_adj[i] -= z_temp;
|
5298
|
5307
|
|
5299
|
5308
|
recalc_delta_settings(delta_radius, delta_diagonal_rod);
|
5300
|
5309
|
}
|
5301
|
|
- else { // !iterate
|
5302
|
|
- // step one back
|
|
5310
|
+ else { // step one back
|
5303
|
5311
|
COPY(endstop_adj, e_old);
|
5304
|
5312
|
delta_radius = dr_old;
|
5305
|
5313
|
home_offset[Z_AXIS] = zh_old;
|
|
5314
|
+ delta_tower_angle_trim[A_AXIS] = alpha_old;
|
|
5315
|
+ delta_tower_angle_trim[B_AXIS] = beta_old;
|
5306
|
5316
|
|
5307
|
5317
|
recalc_delta_settings(delta_radius, delta_diagonal_rod);
|
5308
|
5318
|
}
|
5309
|
5319
|
|
5310
|
|
- // print report
|
|
5320
|
+ // print report
|
5311
|
5321
|
|
5312
|
|
- #if ENABLED(DELTA_CALIBRATE_EXPERT_MODE)
|
5313
|
|
- if (verbose_level == 3) {
|
5314
|
|
- const float r_factor = 22.902 * sq(r_diff_max) * r_diff_max
|
5315
|
|
- - 44.988 * sq(r_diff_max)
|
5316
|
|
- + 31.697 * r_diff_max
|
5317
|
|
- - 9.4439;
|
5318
|
|
- SERIAL_PROTOCOLPAIR("h_factor:", 1.0 / h_diff_min);
|
5319
|
|
- SERIAL_PROTOCOLPAIR(" r_factor:", r_factor);
|
5320
|
|
- SERIAL_EOL;
|
5321
|
|
- }
|
5322
|
|
- #endif
|
5323
|
|
- if (verbose_level == 2) {
|
5324
|
|
- SERIAL_PROTOCOLPGM(". c:");
|
|
5322
|
+ if (verbose_level != 1) {
|
|
5323
|
+ SERIAL_PROTOCOLPGM(". c:");
|
5325
|
5324
|
if (z_at_pt[0] > 0) SERIAL_CHAR('+');
|
5326
|
5325
|
SERIAL_PROTOCOL_F(z_at_pt[0], 2);
|
5327
|
|
- if (probe_points > 1) {
|
|
5326
|
+ if (probe_mode == 2 || pp_greather_2) {
|
5328
|
5327
|
SERIAL_PROTOCOLPGM(" x:");
|
5329
|
5328
|
if (z_at_pt[1] >= 0) SERIAL_CHAR('+');
|
5330
|
5329
|
SERIAL_PROTOCOL_F(z_at_pt[1], 2);
|
|
@@ -5335,9 +5334,12 @@ inline void gcode_G28() {
|
5335
|
5334
|
if (z_at_pt[9] >= 0) SERIAL_CHAR('+');
|
5336
|
5335
|
SERIAL_PROTOCOL_F(z_at_pt[9], 2);
|
5337
|
5336
|
}
|
5338
|
|
- if (probe_points > 0) SERIAL_EOL;
|
5339
|
|
- if (probe_points > 2 || probe_points == -2) {
|
5340
|
|
- if (probe_points > 2) SERIAL_PROTOCOLPGM(". ");
|
|
5337
|
+ if (probe_mode != -2) SERIAL_EOL;
|
|
5338
|
+ if (probe_mode == -2 || pp_greather_2) {
|
|
5339
|
+ if (pp_greather_2) {
|
|
5340
|
+ SERIAL_CHAR('.');
|
|
5341
|
+ SERIAL_PROTOCOL_SP(13);
|
|
5342
|
+ }
|
5341
|
5343
|
SERIAL_PROTOCOLPGM(" yz:");
|
5342
|
5344
|
if (z_at_pt[7] >= 0) SERIAL_CHAR('+');
|
5343
|
5345
|
SERIAL_PROTOCOL_F(z_at_pt[7], 2);
|
|
@@ -5350,25 +5352,27 @@ inline void gcode_G28() {
|
5350
|
5352
|
SERIAL_EOL;
|
5351
|
5353
|
}
|
5352
|
5354
|
}
|
5353
|
|
- if (test_precision != 0.0) { // !forced end
|
5354
|
|
- if (zero_std_dev >= test_precision) {
|
|
5355
|
+ if (test_precision != 0.0) { // !forced end
|
|
5356
|
+ if (zero_std_dev >= test_precision) { // end iterations
|
5355
|
5357
|
SERIAL_PROTOCOLPGM("Calibration OK");
|
5356
|
|
- SERIAL_PROTOCOLLNPGM(" rolling back 1");
|
5357
|
|
- LCD_MESSAGEPGM("Calibration OK");
|
|
5358
|
+ SERIAL_PROTOCOL_SP(36);
|
|
5359
|
+ SERIAL_PROTOCOLPGM("rolling back.");
|
5358
|
5360
|
SERIAL_EOL;
|
|
5361
|
+ LCD_MESSAGEPGM("Calibration OK");
|
5359
|
5362
|
}
|
5360
|
|
- else { // !end iterations
|
|
5363
|
+ else { // !end iterations
|
5361
|
5364
|
char mess[15] = "No convergence";
|
5362
|
5365
|
if (iterations < 31)
|
5363
|
5366
|
sprintf_P(mess, PSTR("Iteration : %02i"), (int)iterations);
|
5364
|
5367
|
SERIAL_PROTOCOL(mess);
|
5365
|
|
- SERIAL_PROTOCOLPGM(" std dev:");
|
|
5368
|
+ SERIAL_PROTOCOL_SP(36);
|
|
5369
|
+ SERIAL_PROTOCOLPGM("std dev:");
|
5366
|
5370
|
SERIAL_PROTOCOL_F(zero_std_dev, 3);
|
5367
|
5371
|
SERIAL_EOL;
|
5368
|
5372
|
lcd_setstatus(mess);
|
5369
|
5373
|
}
|
5370
|
|
- SERIAL_PROTOCOLPAIR("Height:", DELTA_HEIGHT + home_offset[Z_AXIS]);
|
5371
|
|
- if (abs(probe_points) > 1) {
|
|
5374
|
+ SERIAL_PROTOCOLPAIR(".Height:", DELTA_HEIGHT + home_offset[Z_AXIS]);
|
|
5375
|
+ if (!pp_equals_1) {
|
5372
|
5376
|
SERIAL_PROTOCOLPGM(" Ex:");
|
5373
|
5377
|
if (endstop_adj[A_AXIS] >= 0) SERIAL_CHAR('+');
|
5374
|
5378
|
SERIAL_PROTOCOL_F(endstop_adj[A_AXIS], 2);
|
|
@@ -5381,23 +5385,38 @@ inline void gcode_G28() {
|
5381
|
5385
|
SERIAL_PROTOCOLPAIR(" Radius:", delta_radius);
|
5382
|
5386
|
}
|
5383
|
5387
|
SERIAL_EOL;
|
|
5388
|
+ if (probe_mode > 2) { // negative disables tower angles
|
|
5389
|
+ SERIAL_PROTOCOLPGM(".Tower angle : Tx:");
|
|
5390
|
+ if (delta_tower_angle_trim[A_AXIS] >= 0) SERIAL_CHAR('+');
|
|
5391
|
+ SERIAL_PROTOCOL_F(delta_tower_angle_trim[A_AXIS], 2);
|
|
5392
|
+ SERIAL_PROTOCOLPGM(" Ty:");
|
|
5393
|
+ if (delta_tower_angle_trim[B_AXIS] >= 0) SERIAL_CHAR('+');
|
|
5394
|
+ SERIAL_PROTOCOL_F(delta_tower_angle_trim[B_AXIS], 2);
|
|
5395
|
+ SERIAL_PROTOCOLPGM(" Tz:+0.00");
|
|
5396
|
+ SERIAL_EOL;
|
|
5397
|
+ }
|
5384
|
5398
|
if (zero_std_dev >= test_precision)
|
5385
|
|
- SERIAL_PROTOCOLLNPGM("Save with M500");
|
|
5399
|
+ serialprintPGM(save_message);
|
|
5400
|
+ SERIAL_EOL;
|
5386
|
5401
|
}
|
5387
|
|
- else { // forced end
|
5388
|
|
- #if ENABLED(DELTA_CALIBRATE_EXPERT_MODE)
|
5389
|
|
- if (verbose_level == 3)
|
5390
|
|
- SERIAL_PROTOCOLLNPGM("Copy to Configuration_adv.h");
|
5391
|
|
- else
|
5392
|
|
- #endif
|
5393
|
|
- {
|
5394
|
|
- SERIAL_PROTOCOLPGM("End DRY-RUN std dev:");
|
5395
|
|
- SERIAL_PROTOCOL_F(zero_std_dev, 3);
|
5396
|
|
- SERIAL_EOL;
|
5397
|
|
- }
|
|
5402
|
+ else { // forced end
|
|
5403
|
+ if (verbose_level == 0) {
|
|
5404
|
+ SERIAL_PROTOCOLPGM("End DRY-RUN");
|
|
5405
|
+ SERIAL_PROTOCOL_SP(39);
|
|
5406
|
+ SERIAL_PROTOCOLPGM("std dev:");
|
|
5407
|
+ SERIAL_PROTOCOL_F(zero_std_dev, 3);
|
|
5408
|
+ SERIAL_EOL;
|
|
5409
|
+ }
|
|
5410
|
+ else {
|
|
5411
|
+ SERIAL_PROTOCOLLNPGM("Calibration OK");
|
|
5412
|
+ LCD_MESSAGEPGM("Calibration OK");
|
|
5413
|
+ SERIAL_PROTOCOLPAIR(".Height:", DELTA_HEIGHT + home_offset[Z_AXIS]);
|
|
5414
|
+ SERIAL_EOL;
|
|
5415
|
+ serialprintPGM(save_message);
|
|
5416
|
+ SERIAL_EOL;
|
|
5417
|
+ }
|
5398
|
5418
|
}
|
5399
|
5419
|
|
5400
|
|
- clean_up_after_endstop_or_probe_move();
|
5401
|
5420
|
stepper.synchronize();
|
5402
|
5421
|
|
5403
|
5422
|
gcode_G28();
|
|
@@ -7620,12 +7639,13 @@ inline void gcode_M205() {
|
7620
|
7639
|
if (code_seen('L')) delta_diagonal_rod = code_value_linear_units();
|
7621
|
7640
|
if (code_seen('R')) delta_radius = code_value_linear_units();
|
7622
|
7641
|
if (code_seen('S')) delta_segments_per_second = code_value_float();
|
7623
|
|
- if (code_seen('A')) delta_diagonal_rod_trim[A_AXIS] = code_value_linear_units();
|
7624
|
|
- if (code_seen('B')) delta_diagonal_rod_trim[B_AXIS] = code_value_linear_units();
|
7625
|
|
- if (code_seen('C')) delta_diagonal_rod_trim[C_AXIS] = code_value_linear_units();
|
7626
|
|
- if (code_seen('I')) delta_tower_angle_trim[A_AXIS] = code_value_linear_units();
|
7627
|
|
- if (code_seen('J')) delta_tower_angle_trim[B_AXIS] = code_value_linear_units();
|
7628
|
|
- if (code_seen('K')) delta_tower_angle_trim[C_AXIS] = code_value_linear_units();
|
|
7642
|
+ if (code_seen('B')) delta_calibration_radius = code_value_float();
|
|
7643
|
+ if (code_seen('X')) delta_tower_angle_trim[A_AXIS] = code_value_linear_units();
|
|
7644
|
+ if (code_seen('Y')) delta_tower_angle_trim[B_AXIS] = code_value_linear_units();
|
|
7645
|
+ if (code_seen('Z')) { // rotate all 3 axis for Z = 0
|
|
7646
|
+ delta_tower_angle_trim[A_AXIS] -= code_value_linear_units();
|
|
7647
|
+ delta_tower_angle_trim[B_AXIS] -= code_value_linear_units();
|
|
7648
|
+ }
|
7629
|
7649
|
recalc_delta_settings(delta_radius, delta_diagonal_rod);
|
7630
|
7650
|
}
|
7631
|
7651
|
/**
|
|
@@ -7653,6 +7673,10 @@ inline void gcode_M205() {
|
7653
|
7673
|
SERIAL_ECHOLNPGM("<<< gcode_M666");
|
7654
|
7674
|
}
|
7655
|
7675
|
#endif
|
|
7676
|
+ // normalize endstops so all are <=0; set the residue to delta height
|
|
7677
|
+ const float z_temp = MAX3(endstop_adj[A_AXIS], endstop_adj[B_AXIS], endstop_adj[C_AXIS]);
|
|
7678
|
+ home_offset[Z_AXIS] -= z_temp;
|
|
7679
|
+ LOOP_XYZ(i) endstop_adj[i] -= z_temp;
|
7656
|
7680
|
}
|
7657
|
7681
|
|
7658
|
7682
|
#elif ENABLED(Z_DUAL_ENDSTOPS) // !DELTA && ENABLED(Z_DUAL_ENDSTOPS)
|
|
@@ -8564,7 +8588,7 @@ inline void gcode_M503() {
|
8564
|
8588
|
|
8565
|
8589
|
if (!isnan(last_zoffset)) {
|
8566
|
8590
|
|
8567
|
|
- #if ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(BABYSTEP_ZPROBE_OFFSET)
|
|
8591
|
+ #if ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(BABYSTEP_ZPROBE_OFFSET) || ENABLED(DELTA)
|
8568
|
8592
|
const float diff = zprobe_zoffset - last_zoffset;
|
8569
|
8593
|
#endif
|
8570
|
8594
|
|
|
@@ -8586,6 +8610,10 @@ inline void gcode_M503() {
|
8586
|
8610
|
#else
|
8587
|
8611
|
UNUSED(no_babystep);
|
8588
|
8612
|
#endif
|
|
8613
|
+
|
|
8614
|
+ #if ENABLED(DELTA) // correct the delta_height
|
|
8615
|
+ home_offset[Z_AXIS] -= diff;
|
|
8616
|
+ #endif
|
8589
|
8617
|
}
|
8590
|
8618
|
|
8591
|
8619
|
last_zoffset = zprobe_zoffset;
|
|
@@ -10651,15 +10679,17 @@ void ok_to_send() {
|
10651
|
10679
|
* settings have been changed (e.g., by M665).
|
10652
|
10680
|
*/
|
10653
|
10681
|
void recalc_delta_settings(float radius, float diagonal_rod) {
|
10654
|
|
- delta_tower[A_AXIS][X_AXIS] = -sin(RADIANS(60 - delta_tower_angle_trim[A_AXIS])) * (radius + DELTA_RADIUS_TRIM_TOWER_1); // front left tower
|
10655
|
|
- delta_tower[A_AXIS][Y_AXIS] = -cos(RADIANS(60 - delta_tower_angle_trim[A_AXIS])) * (radius + DELTA_RADIUS_TRIM_TOWER_1);
|
10656
|
|
- delta_tower[B_AXIS][X_AXIS] = sin(RADIANS(60 + delta_tower_angle_trim[B_AXIS])) * (radius + DELTA_RADIUS_TRIM_TOWER_2); // front right tower
|
10657
|
|
- delta_tower[B_AXIS][Y_AXIS] = -cos(RADIANS(60 + delta_tower_angle_trim[B_AXIS])) * (radius + DELTA_RADIUS_TRIM_TOWER_2);
|
10658
|
|
- delta_tower[C_AXIS][X_AXIS] = -sin(RADIANS( delta_tower_angle_trim[C_AXIS])) * (radius + DELTA_RADIUS_TRIM_TOWER_3); // back middle tower
|
10659
|
|
- delta_tower[C_AXIS][Y_AXIS] = cos(RADIANS( delta_tower_angle_trim[C_AXIS])) * (radius + DELTA_RADIUS_TRIM_TOWER_3);
|
10660
|
|
- delta_diagonal_rod_2_tower[A_AXIS] = sq(diagonal_rod + delta_diagonal_rod_trim[A_AXIS]);
|
10661
|
|
- delta_diagonal_rod_2_tower[B_AXIS] = sq(diagonal_rod + delta_diagonal_rod_trim[B_AXIS]);
|
10662
|
|
- delta_diagonal_rod_2_tower[C_AXIS] = sq(diagonal_rod + delta_diagonal_rod_trim[C_AXIS]);
|
|
10682
|
+ const float trt[ABC] = DELTA_RADIUS_TRIM_TOWER,
|
|
10683
|
+ drt[ABC] = DELTA_DIAGONAL_ROD_TRIM_TOWER;
|
|
10684
|
+ delta_tower[A_AXIS][X_AXIS] = cos(RADIANS(210 + delta_tower_angle_trim[A_AXIS])) * (radius + trt[A_AXIS]); // front left tower
|
|
10685
|
+ delta_tower[A_AXIS][Y_AXIS] = sin(RADIANS(210 + delta_tower_angle_trim[A_AXIS])) * (radius + trt[A_AXIS]);
|
|
10686
|
+ delta_tower[B_AXIS][X_AXIS] = cos(RADIANS(330 + delta_tower_angle_trim[B_AXIS])) * (radius + trt[B_AXIS]); // front right tower
|
|
10687
|
+ delta_tower[B_AXIS][Y_AXIS] = sin(RADIANS(330 + delta_tower_angle_trim[B_AXIS])) * (radius + trt[B_AXIS]);
|
|
10688
|
+ delta_tower[C_AXIS][X_AXIS] = 0.0; // back middle tower
|
|
10689
|
+ delta_tower[C_AXIS][Y_AXIS] = (radius + trt[C_AXIS]);
|
|
10690
|
+ delta_diagonal_rod_2_tower[A_AXIS] = sq(diagonal_rod + drt[A_AXIS]);
|
|
10691
|
+ delta_diagonal_rod_2_tower[B_AXIS] = sq(diagonal_rod + drt[B_AXIS]);
|
|
10692
|
+ delta_diagonal_rod_2_tower[C_AXIS] = sq(diagonal_rod + drt[C_AXIS]);
|
10663
|
10693
|
}
|
10664
|
10694
|
|
10665
|
10695
|
#if ENABLED(DELTA_FAST_SQRT)
|