|
@@ -245,7 +245,7 @@ float volumetric_multiplier[EXTRUDERS] = {1.0
|
245
|
245
|
#endif
|
246
|
246
|
};
|
247
|
247
|
float current_position[NUM_AXIS] = { 0.0, 0.0, 0.0, 0.0 };
|
248
|
|
-float add_homing[3] = { 0, 0, 0 };
|
|
248
|
+float home_offset[3] = { 0, 0, 0 };
|
249
|
249
|
#ifdef DELTA
|
250
|
250
|
float endstop_adj[3] = { 0, 0, 0 };
|
251
|
251
|
#endif
|
|
@@ -1006,9 +1006,9 @@ static void axis_is_at_home(int axis) {
|
1006
|
1006
|
return;
|
1007
|
1007
|
}
|
1008
|
1008
|
else if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && active_extruder == 0) {
|
1009
|
|
- current_position[X_AXIS] = base_home_pos(X_AXIS) + add_homing[X_AXIS];
|
1010
|
|
- min_pos[X_AXIS] = base_min_pos(X_AXIS) + add_homing[X_AXIS];
|
1011
|
|
- max_pos[X_AXIS] = min(base_max_pos(X_AXIS) + add_homing[X_AXIS],
|
|
1009
|
+ current_position[X_AXIS] = base_home_pos(X_AXIS) + home_offset[X_AXIS];
|
|
1010
|
+ min_pos[X_AXIS] = base_min_pos(X_AXIS) + home_offset[X_AXIS];
|
|
1011
|
+ max_pos[X_AXIS] = min(base_max_pos(X_AXIS) + home_offset[X_AXIS],
|
1012
|
1012
|
max(extruder_offset[X_AXIS][1], X2_MAX_POS) - duplicate_extruder_x_offset);
|
1013
|
1013
|
return;
|
1014
|
1014
|
}
|
|
@@ -1036,11 +1036,11 @@ static void axis_is_at_home(int axis) {
|
1036
|
1036
|
|
1037
|
1037
|
for (i=0; i<2; i++)
|
1038
|
1038
|
{
|
1039
|
|
- delta[i] -= add_homing[i];
|
|
1039
|
+ delta[i] -= home_offset[i];
|
1040
|
1040
|
}
|
1041
|
1041
|
|
1042
|
|
- // SERIAL_ECHOPGM("addhome X="); SERIAL_ECHO(add_homing[X_AXIS]);
|
1043
|
|
- // SERIAL_ECHOPGM(" addhome Y="); SERIAL_ECHO(add_homing[Y_AXIS]);
|
|
1042
|
+ // SERIAL_ECHOPGM("addhome X="); SERIAL_ECHO(home_offset[X_AXIS]);
|
|
1043
|
+ // SERIAL_ECHOPGM(" addhome Y="); SERIAL_ECHO(home_offset[Y_AXIS]);
|
1044
|
1044
|
// SERIAL_ECHOPGM(" addhome Theta="); SERIAL_ECHO(delta[X_AXIS]);
|
1045
|
1045
|
// SERIAL_ECHOPGM(" addhome Psi+Theta="); SERIAL_ECHOLN(delta[Y_AXIS]);
|
1046
|
1046
|
|
|
@@ -1058,14 +1058,14 @@ static void axis_is_at_home(int axis) {
|
1058
|
1058
|
}
|
1059
|
1059
|
else
|
1060
|
1060
|
{
|
1061
|
|
- current_position[axis] = base_home_pos(axis) + add_homing[axis];
|
1062
|
|
- min_pos[axis] = base_min_pos(axis) + add_homing[axis];
|
1063
|
|
- max_pos[axis] = base_max_pos(axis) + add_homing[axis];
|
|
1061
|
+ current_position[axis] = base_home_pos(axis) + home_offset[axis];
|
|
1062
|
+ min_pos[axis] = base_min_pos(axis) + home_offset[axis];
|
|
1063
|
+ max_pos[axis] = base_max_pos(axis) + home_offset[axis];
|
1064
|
1064
|
}
|
1065
|
1065
|
#else
|
1066
|
|
- current_position[axis] = base_home_pos(axis) + add_homing[axis];
|
1067
|
|
- min_pos[axis] = base_min_pos(axis) + add_homing[axis];
|
1068
|
|
- max_pos[axis] = base_max_pos(axis) + add_homing[axis];
|
|
1066
|
+ current_position[axis] = base_home_pos(axis) + home_offset[axis];
|
|
1067
|
+ min_pos[axis] = base_min_pos(axis) + home_offset[axis];
|
|
1068
|
+ max_pos[axis] = base_max_pos(axis) + home_offset[axis];
|
1069
|
1069
|
#endif
|
1070
|
1070
|
}
|
1071
|
1071
|
|
|
@@ -1299,7 +1299,13 @@ static void engage_z_probe() {
|
1299
|
1299
|
static void retract_z_probe() {
|
1300
|
1300
|
// Retract Z Servo endstop if enabled
|
1301
|
1301
|
#ifdef SERVO_ENDSTOPS
|
1302
|
|
- if (servo_endstops[Z_AXIS] > -1) {
|
|
1302
|
+ if (servo_endstops[Z_AXIS] > -1)
|
|
1303
|
+ {
|
|
1304
|
+ #if Z_RAISE_AFTER_PROBING > 0
|
|
1305
|
+ do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], Z_RAISE_AFTER_PROBING);
|
|
1306
|
+ st_synchronize();
|
|
1307
|
+ #endif
|
|
1308
|
+
|
1303
|
1309
|
#if SERVO_LEVELING
|
1304
|
1310
|
servos[servo_endstops[Z_AXIS]].attach(0);
|
1305
|
1311
|
#endif
|
|
@@ -1312,7 +1318,7 @@ static void retract_z_probe() {
|
1312
|
1318
|
#elif defined(Z_PROBE_ALLEN_KEY)
|
1313
|
1319
|
// Move up for safety
|
1314
|
1320
|
feedrate = homing_feedrate[X_AXIS];
|
1315
|
|
- destination[Z_AXIS] = current_position[Z_AXIS] + 20;
|
|
1321
|
+ destination[Z_AXIS] = current_position[Z_AXIS] + Z_RAISE_AFTER_PROBING;
|
1316
|
1322
|
prepare_move_raw();
|
1317
|
1323
|
|
1318
|
1324
|
// Move to the start position to initiate retraction
|
|
@@ -1354,10 +1360,15 @@ static void retract_z_probe() {
|
1354
|
1360
|
|
1355
|
1361
|
}
|
1356
|
1362
|
|
1357
|
|
-enum ProbeAction { ProbeStay, ProbeEngage, ProbeRetract, ProbeEngageRetract };
|
|
1363
|
+enum ProbeAction {
|
|
1364
|
+ ProbeStay = 0,
|
|
1365
|
+ ProbeEngage = BIT(0),
|
|
1366
|
+ ProbeRetract = BIT(1),
|
|
1367
|
+ ProbeEngageAndRetract = (ProbeEngage | ProbeRetract)
|
|
1368
|
+};
|
1358
|
1369
|
|
1359
|
1370
|
/// Probe bed height at position (x,y), returns the measured z value
|
1360
|
|
-static float probe_pt(float x, float y, float z_before, ProbeAction retract_action=ProbeEngageRetract, int verbose_level=1) {
|
|
1371
|
+static float probe_pt(float x, float y, float z_before, ProbeAction retract_action=ProbeEngageAndRetract, int verbose_level=1) {
|
1361
|
1372
|
// move to right place
|
1362
|
1373
|
do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], z_before);
|
1363
|
1374
|
do_blocking_move_to(x - X_PROBE_OFFSET_FROM_EXTRUDER, y - Y_PROBE_OFFSET_FROM_EXTRUDER, current_position[Z_AXIS]);
|
|
@@ -1848,7 +1859,7 @@ inline void gcode_G28() {
|
1848
|
1859
|
if (code_value_long() != 0) {
|
1849
|
1860
|
current_position[X_AXIS] = code_value()
|
1850
|
1861
|
#ifndef SCARA
|
1851
|
|
- + add_homing[X_AXIS]
|
|
1862
|
+ + home_offset[X_AXIS]
|
1852
|
1863
|
#endif
|
1853
|
1864
|
;
|
1854
|
1865
|
}
|
|
@@ -1857,7 +1868,7 @@ inline void gcode_G28() {
|
1857
|
1868
|
if (code_seen(axis_codes[Y_AXIS]) && code_value_long() != 0) {
|
1858
|
1869
|
current_position[Y_AXIS] = code_value()
|
1859
|
1870
|
#ifndef SCARA
|
1860
|
|
- + add_homing[Y_AXIS]
|
|
1871
|
+ + home_offset[Y_AXIS]
|
1861
|
1872
|
#endif
|
1862
|
1873
|
;
|
1863
|
1874
|
}
|
|
@@ -1931,7 +1942,7 @@ inline void gcode_G28() {
|
1931
|
1942
|
|
1932
|
1943
|
|
1933
|
1944
|
if (code_seen(axis_codes[Z_AXIS]) && code_value_long() != 0)
|
1934
|
|
- current_position[Z_AXIS] = code_value() + add_homing[Z_AXIS];
|
|
1945
|
+ current_position[Z_AXIS] = code_value() + home_offset[Z_AXIS];
|
1935
|
1946
|
|
1936
|
1947
|
#ifdef ENABLE_AUTO_BED_LEVELING
|
1937
|
1948
|
if (home_all_axis || code_seen(axis_codes[Z_AXIS]))
|
|
@@ -2118,7 +2129,7 @@ inline void gcode_G28() {
|
2118
|
2129
|
#ifdef AUTO_BED_LEVELING_GRID
|
2119
|
2130
|
|
2120
|
2131
|
#ifndef DELTA
|
2121
|
|
- bool topo_flag = verbose_level > 2 || code_seen('T') || code_seen('t');
|
|
2132
|
+ bool do_topography_map = verbose_level > 2 || code_seen('T') || code_seen('t');
|
2122
|
2133
|
#endif
|
2123
|
2134
|
|
2124
|
2135
|
if (verbose_level > 0)
|
|
@@ -2173,15 +2184,16 @@ inline void gcode_G28() {
|
2173
|
2184
|
|
2174
|
2185
|
#ifdef Z_PROBE_SLED
|
2175
|
2186
|
dock_sled(false); // engage (un-dock) the probe
|
2176
|
|
- #elif not defined(SERVO_ENDSTOPS)
|
|
2187
|
+ #elif defined(Z_PROBE_ALLEN_KEY)
|
2177
|
2188
|
engage_z_probe();
|
2178
|
2189
|
#endif
|
2179
|
2190
|
|
2180
|
2191
|
st_synchronize();
|
2181
|
2192
|
|
2182
|
|
- #ifdef DELTA
|
2183
|
|
- reset_bed_level();
|
2184
|
|
- #else
|
|
2193
|
+ #ifdef DELTA
|
|
2194
|
+ reset_bed_level();
|
|
2195
|
+ #else
|
|
2196
|
+
|
2185
|
2197
|
// make sure the bed_level_rotation_matrix is identity or the planner will get it incorectly
|
2186
|
2198
|
//vector_3 corrected_position = plan_get_position_mm();
|
2187
|
2199
|
//corrected_position.debug("position before G29");
|
|
@@ -2222,42 +2234,36 @@ inline void gcode_G28() {
|
2222
|
2234
|
delta_grid_spacing[1] = yGridSpacing;
|
2223
|
2235
|
|
2224
|
2236
|
float z_offset = Z_PROBE_OFFSET_FROM_EXTRUDER;
|
2225
|
|
- if (code_seen(axis_codes[Z_AXIS])) {
|
2226
|
|
- z_offset += code_value();
|
2227
|
|
- }
|
|
2237
|
+ if (code_seen(axis_codes[Z_AXIS])) z_offset += code_value();
|
2228
|
2238
|
#endif
|
2229
|
2239
|
|
2230
|
2240
|
int probePointCounter = 0;
|
2231
|
2241
|
bool zig = true;
|
2232
|
2242
|
|
2233
|
|
- for (int yCount=0; yCount < auto_bed_leveling_grid_points; yCount++)
|
2234
|
|
- {
|
|
2243
|
+ for (int yCount = 0; yCount < auto_bed_leveling_grid_points; yCount++) {
|
2235
|
2244
|
double yProbe = front_probe_bed_position + yGridSpacing * yCount;
|
2236
|
2245
|
int xStart, xStop, xInc;
|
2237
|
2246
|
|
2238
|
|
- if (zig)
|
2239
|
|
- {
|
|
2247
|
+ if (zig) {
|
2240
|
2248
|
xStart = 0;
|
2241
|
2249
|
xStop = auto_bed_leveling_grid_points;
|
2242
|
2250
|
xInc = 1;
|
2243
|
2251
|
zig = false;
|
2244
|
2252
|
}
|
2245
|
|
- else
|
2246
|
|
- {
|
|
2253
|
+ else {
|
2247
|
2254
|
xStart = auto_bed_leveling_grid_points - 1;
|
2248
|
2255
|
xStop = -1;
|
2249
|
2256
|
xInc = -1;
|
2250
|
2257
|
zig = true;
|
2251
|
2258
|
}
|
2252
|
2259
|
|
2253
|
|
- #ifndef DELTA
|
2254
|
|
- // If topo_flag is set then don't zig-zag. Just scan in one direction.
|
2255
|
|
- // This gets the probe points in more readable order.
|
2256
|
|
- if (!topo_flag) zig = !zig;
|
2257
|
|
- #endif
|
|
2260
|
+ #ifndef DELTA
|
|
2261
|
+ // If do_topography_map is set then don't zig-zag. Just scan in one direction.
|
|
2262
|
+ // This gets the probe points in more readable order.
|
|
2263
|
+ if (!do_topography_map) zig = !zig;
|
|
2264
|
+ #endif
|
2258
|
2265
|
|
2259
|
|
- for (int xCount=xStart; xCount != xStop; xCount += xInc)
|
2260
|
|
- {
|
|
2266
|
+ for (int xCount = xStart; xCount != xStop; xCount += xInc) {
|
2261
|
2267
|
double xProbe = left_probe_bed_position + xGridSpacing * xCount;
|
2262
|
2268
|
|
2263
|
2269
|
// raise extruder
|
|
@@ -2282,7 +2288,7 @@ inline void gcode_G28() {
|
2282
|
2288
|
act = ProbeStay;
|
2283
|
2289
|
}
|
2284
|
2290
|
else
|
2285
|
|
- act = ProbeEngageRetract;
|
|
2291
|
+ act = ProbeEngageAndRetract;
|
2286
|
2292
|
|
2287
|
2293
|
measured_z = probe_pt(xProbe, yProbe, z_before, act, verbose_level);
|
2288
|
2294
|
|
|
@@ -2324,49 +2330,31 @@ inline void gcode_G28() {
|
2324
|
2330
|
}
|
2325
|
2331
|
}
|
2326
|
2332
|
|
2327
|
|
- if (topo_flag) {
|
2328
|
|
-
|
2329
|
|
- int xx, yy;
|
|
2333
|
+ // Show the Topography map if enabled
|
|
2334
|
+ if (do_topography_map) {
|
2330
|
2335
|
|
2331
|
2336
|
SERIAL_PROTOCOLPGM(" \nBed Height Topography: \n");
|
2332
|
|
- #if TOPO_ORIGIN == OriginFrontLeft
|
2333
|
|
- SERIAL_PROTOCOLPGM("+-----------+\n");
|
2334
|
|
- SERIAL_PROTOCOLPGM("|...Back....|\n");
|
2335
|
|
- SERIAL_PROTOCOLPGM("|Left..Right|\n");
|
2336
|
|
- SERIAL_PROTOCOLPGM("|...Front...|\n");
|
2337
|
|
- SERIAL_PROTOCOLPGM("+-----------+\n");
|
2338
|
|
- for (yy = auto_bed_leveling_grid_points - 1; yy >= 0; yy--)
|
2339
|
|
- #else
|
2340
|
|
- for (yy = 0; yy < auto_bed_leveling_grid_points; yy++)
|
2341
|
|
- #endif
|
2342
|
|
- {
|
2343
|
|
- #if TOPO_ORIGIN == OriginBackRight
|
2344
|
|
- for (xx = 0; xx < auto_bed_leveling_grid_points; xx++)
|
2345
|
|
- #else
|
2346
|
|
- for (xx = auto_bed_leveling_grid_points - 1; xx >= 0; xx--)
|
2347
|
|
- #endif
|
2348
|
|
- {
|
2349
|
|
- int ind =
|
2350
|
|
- #if TOPO_ORIGIN == OriginBackRight || TOPO_ORIGIN == OriginFrontLeft
|
2351
|
|
- yy * auto_bed_leveling_grid_points + xx
|
2352
|
|
- #elif TOPO_ORIGIN == OriginBackLeft
|
2353
|
|
- xx * auto_bed_leveling_grid_points + yy
|
2354
|
|
- #elif TOPO_ORIGIN == OriginFrontRight
|
2355
|
|
- abl2 - xx * auto_bed_leveling_grid_points - yy - 1
|
2356
|
|
- #endif
|
2357
|
|
- ;
|
2358
|
|
- float diff = eqnBVector[ind] - mean;
|
2359
|
|
- if (diff >= 0.0)
|
2360
|
|
- SERIAL_PROTOCOLPGM(" +"); // Include + for column alignment
|
2361
|
|
- else
|
2362
|
|
- SERIAL_PROTOCOLPGM(" ");
|
2363
|
|
- SERIAL_PROTOCOL_F(diff, 5);
|
2364
|
|
- } // xx
|
2365
|
|
- SERIAL_EOL;
|
2366
|
|
- } // yy
|
|
2337
|
+ SERIAL_PROTOCOLPGM("+-----------+\n");
|
|
2338
|
+ SERIAL_PROTOCOLPGM("|...Back....|\n");
|
|
2339
|
+ SERIAL_PROTOCOLPGM("|Left..Right|\n");
|
|
2340
|
+ SERIAL_PROTOCOLPGM("|...Front...|\n");
|
|
2341
|
+ SERIAL_PROTOCOLPGM("+-----------+\n");
|
|
2342
|
+
|
|
2343
|
+ for (int yy = auto_bed_leveling_grid_points - 1; yy >= 0; yy--) {
|
|
2344
|
+ for (int xx = auto_bed_leveling_grid_points - 1; xx >= 0; xx--) {
|
|
2345
|
+ int ind = yy * auto_bed_leveling_grid_points + xx;
|
|
2346
|
+ float diff = eqnBVector[ind] - mean;
|
|
2347
|
+ if (diff >= 0.0)
|
|
2348
|
+ SERIAL_PROTOCOLPGM(" +"); // Include + for column alignment
|
|
2349
|
+ else
|
|
2350
|
+ SERIAL_PROTOCOLPGM(" ");
|
|
2351
|
+ SERIAL_PROTOCOL_F(diff, 5);
|
|
2352
|
+ } // xx
|
2367
|
2353
|
SERIAL_EOL;
|
|
2354
|
+ } // yy
|
|
2355
|
+ SERIAL_EOL;
|
2368
|
2356
|
|
2369
|
|
- } //topo_flag
|
|
2357
|
+ } //do_topography_map
|
2370
|
2358
|
|
2371
|
2359
|
|
2372
|
2360
|
set_bed_level_equation_lsq(plane_equation_coefficients);
|
|
@@ -2388,18 +2376,15 @@ inline void gcode_G28() {
|
2388
|
2376
|
z_at_pt_3 = probe_pt(ABL_PROBE_PT_3_X, ABL_PROBE_PT_3_Y, current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS, ProbeRetract, verbose_level);
|
2389
|
2377
|
}
|
2390
|
2378
|
else {
|
2391
|
|
- z_at_pt_1 = probe_pt(ABL_PROBE_PT_1_X, ABL_PROBE_PT_1_Y, Z_RAISE_BEFORE_PROBING, verbose_level=verbose_level);
|
2392
|
|
- z_at_pt_2 = probe_pt(ABL_PROBE_PT_2_X, ABL_PROBE_PT_2_Y, current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS, verbose_level=verbose_level);
|
2393
|
|
- z_at_pt_3 = probe_pt(ABL_PROBE_PT_3_X, ABL_PROBE_PT_3_Y, current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS, verbose_level=verbose_level);
|
|
2379
|
+ z_at_pt_1 = probe_pt(ABL_PROBE_PT_1_X, ABL_PROBE_PT_1_Y, Z_RAISE_BEFORE_PROBING, ProbeEngageAndRetract, verbose_level);
|
|
2380
|
+ z_at_pt_2 = probe_pt(ABL_PROBE_PT_2_X, ABL_PROBE_PT_2_Y, current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS, ProbeEngageAndRetract, verbose_level);
|
|
2381
|
+ z_at_pt_3 = probe_pt(ABL_PROBE_PT_3_X, ABL_PROBE_PT_3_Y, current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS, ProbeEngageAndRetract, verbose_level);
|
2394
|
2382
|
}
|
2395
|
2383
|
clean_up_after_endstop_move();
|
2396
|
2384
|
set_bed_level_equation_3pts(z_at_pt_1, z_at_pt_2, z_at_pt_3);
|
2397
|
2385
|
|
2398
|
2386
|
#endif // !AUTO_BED_LEVELING_GRID
|
2399
|
2387
|
|
2400
|
|
- do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], Z_RAISE_AFTER_PROBING);
|
2401
|
|
- st_synchronize();
|
2402
|
|
-
|
2403
|
2388
|
#ifndef DELTA
|
2404
|
2389
|
if (verbose_level > 0)
|
2405
|
2390
|
plan_bed_level_matrix.debug(" \n\nBed Level Correction Matrix:");
|
|
@@ -2419,7 +2404,7 @@ inline void gcode_G28() {
|
2419
|
2404
|
|
2420
|
2405
|
#ifdef Z_PROBE_SLED
|
2421
|
2406
|
dock_sled(true, -SLED_DOCKING_OFFSET); // dock the probe, correcting for over-travel
|
2422
|
|
- #elif not defined(SERVO_ENDSTOPS)
|
|
2407
|
+ #elif defined(Z_PROBE_ALLEN_KEY)
|
2423
|
2408
|
retract_z_probe();
|
2424
|
2409
|
#endif
|
2425
|
2410
|
|
|
@@ -2464,22 +2449,13 @@ inline void gcode_G92() {
|
2464
|
2449
|
if (!code_seen(axis_codes[E_AXIS]))
|
2465
|
2450
|
st_synchronize();
|
2466
|
2451
|
|
2467
|
|
- for (int i=0;i<NUM_AXIS;i++) {
|
|
2452
|
+ for (int i = 0; i < NUM_AXIS; i++) {
|
2468
|
2453
|
if (code_seen(axis_codes[i])) {
|
2469
|
|
- if (i == E_AXIS) {
|
2470
|
|
- current_position[i] = code_value();
|
|
2454
|
+ current_position[i] = code_value();
|
|
2455
|
+ if (i == E_AXIS)
|
2471
|
2456
|
plan_set_e_position(current_position[E_AXIS]);
|
2472
|
|
- }
|
2473
|
|
- else {
|
2474
|
|
- current_position[i] = code_value() +
|
2475
|
|
- #ifdef SCARA
|
2476
|
|
- ((i != X_AXIS && i != Y_AXIS) ? add_homing[i] : 0)
|
2477
|
|
- #else
|
2478
|
|
- add_homing[i]
|
2479
|
|
- #endif
|
2480
|
|
- ;
|
|
2457
|
+ else
|
2481
|
2458
|
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
|
2482
|
|
- }
|
2483
|
2459
|
}
|
2484
|
2460
|
}
|
2485
|
2461
|
}
|
|
@@ -3416,9 +3392,9 @@ inline void gcode_M114() {
|
3416
|
3392
|
SERIAL_PROTOCOLLN("");
|
3417
|
3393
|
|
3418
|
3394
|
SERIAL_PROTOCOLPGM("SCARA Cal - Theta:");
|
3419
|
|
- SERIAL_PROTOCOL(delta[X_AXIS]+add_homing[X_AXIS]);
|
|
3395
|
+ SERIAL_PROTOCOL(delta[X_AXIS]+home_offset[X_AXIS]);
|
3420
|
3396
|
SERIAL_PROTOCOLPGM(" Psi+Theta (90):");
|
3421
|
|
- SERIAL_PROTOCOL(delta[Y_AXIS]-delta[X_AXIS]-90+add_homing[Y_AXIS]);
|
|
3397
|
+ SERIAL_PROTOCOL(delta[Y_AXIS]-delta[X_AXIS]-90+home_offset[Y_AXIS]);
|
3422
|
3398
|
SERIAL_PROTOCOLLN("");
|
3423
|
3399
|
|
3424
|
3400
|
SERIAL_PROTOCOLPGM("SCARA step Cal - Theta:");
|
|
@@ -3636,12 +3612,12 @@ inline void gcode_M205() {
|
3636
|
3612
|
inline void gcode_M206() {
|
3637
|
3613
|
for (int8_t i=X_AXIS; i <= Z_AXIS; i++) {
|
3638
|
3614
|
if (code_seen(axis_codes[i])) {
|
3639
|
|
- add_homing[i] = code_value();
|
|
3615
|
+ home_offset[i] = code_value();
|
3640
|
3616
|
}
|
3641
|
3617
|
}
|
3642
|
3618
|
#ifdef SCARA
|
3643
|
|
- if (code_seen('T')) add_homing[X_AXIS] = code_value(); // Theta
|
3644
|
|
- if (code_seen('P')) add_homing[Y_AXIS] = code_value(); // Psi
|
|
3619
|
+ if (code_seen('T')) home_offset[X_AXIS] = code_value(); // Theta
|
|
3620
|
+ if (code_seen('P')) home_offset[Y_AXIS] = code_value(); // Psi
|
3645
|
3621
|
#endif
|
3646
|
3622
|
}
|
3647
|
3623
|
|
|
@@ -5239,7 +5215,7 @@ void clamp_to_software_endstops(float target[3])
|
5239
|
5215
|
float negative_z_offset = 0;
|
5240
|
5216
|
#ifdef ENABLE_AUTO_BED_LEVELING
|
5241
|
5217
|
if (Z_PROBE_OFFSET_FROM_EXTRUDER < 0) negative_z_offset = negative_z_offset + Z_PROBE_OFFSET_FROM_EXTRUDER;
|
5242
|
|
- if (add_homing[Z_AXIS] < 0) negative_z_offset = negative_z_offset + add_homing[Z_AXIS];
|
|
5218
|
+ if (home_offset[Z_AXIS] < 0) negative_z_offset = negative_z_offset + home_offset[Z_AXIS];
|
5243
|
5219
|
#endif
|
5244
|
5220
|
|
5245
|
5221
|
if (target[Z_AXIS] < min_pos[Z_AXIS]+negative_z_offset) target[Z_AXIS] = min_pos[Z_AXIS]+negative_z_offset;
|