|
@@ -248,7 +248,7 @@ float volumetric_multiplier[EXTRUDERS] = {1.0
|
248
|
248
|
#endif
|
249
|
249
|
};
|
250
|
250
|
float current_position[NUM_AXIS] = { 0.0, 0.0, 0.0, 0.0 };
|
251
|
|
-float add_homing[3] = { 0, 0, 0 };
|
|
251
|
+float home_offset[3] = { 0, 0, 0 };
|
252
|
252
|
#ifdef DELTA
|
253
|
253
|
float endstop_adj[3] = { 0, 0, 0 };
|
254
|
254
|
#endif
|
|
@@ -984,7 +984,7 @@ static int dual_x_carriage_mode = DEFAULT_DUAL_X_CARRIAGE_MODE;
|
984
|
984
|
|
985
|
985
|
static float x_home_pos(int extruder) {
|
986
|
986
|
if (extruder == 0)
|
987
|
|
- return base_home_pos(X_AXIS) + add_homing[X_AXIS];
|
|
987
|
+ return base_home_pos(X_AXIS) + home_offset[X_AXIS];
|
988
|
988
|
else
|
989
|
989
|
// In dual carriage mode the extruder offset provides an override of the
|
990
|
990
|
// second X-carriage offset when homed - otherwise X2_HOME_POS is used.
|
|
@@ -1016,9 +1016,9 @@ static void axis_is_at_home(int axis) {
|
1016
|
1016
|
return;
|
1017
|
1017
|
}
|
1018
|
1018
|
else if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && active_extruder == 0) {
|
1019
|
|
- current_position[X_AXIS] = base_home_pos(X_AXIS) + add_homing[X_AXIS];
|
1020
|
|
- min_pos[X_AXIS] = base_min_pos(X_AXIS) + add_homing[X_AXIS];
|
1021
|
|
- max_pos[X_AXIS] = min(base_max_pos(X_AXIS) + add_homing[X_AXIS],
|
|
1019
|
+ current_position[X_AXIS] = base_home_pos(X_AXIS) + home_offset[X_AXIS];
|
|
1020
|
+ min_pos[X_AXIS] = base_min_pos(X_AXIS) + home_offset[X_AXIS];
|
|
1021
|
+ max_pos[X_AXIS] = min(base_max_pos(X_AXIS) + home_offset[X_AXIS],
|
1022
|
1022
|
max(extruder_offset[X_AXIS][1], X2_MAX_POS) - duplicate_extruder_x_offset);
|
1023
|
1023
|
return;
|
1024
|
1024
|
}
|
|
@@ -1046,11 +1046,11 @@ static void axis_is_at_home(int axis) {
|
1046
|
1046
|
|
1047
|
1047
|
for (i=0; i<2; i++)
|
1048
|
1048
|
{
|
1049
|
|
- delta[i] -= add_homing[i];
|
|
1049
|
+ delta[i] -= home_offset[i];
|
1050
|
1050
|
}
|
1051
|
1051
|
|
1052
|
|
- // SERIAL_ECHOPGM("addhome X="); SERIAL_ECHO(add_homing[X_AXIS]);
|
1053
|
|
- // SERIAL_ECHOPGM(" addhome Y="); SERIAL_ECHO(add_homing[Y_AXIS]);
|
|
1052
|
+ // SERIAL_ECHOPGM("addhome X="); SERIAL_ECHO(home_offset[X_AXIS]);
|
|
1053
|
+ // SERIAL_ECHOPGM(" addhome Y="); SERIAL_ECHO(home_offset[Y_AXIS]);
|
1054
|
1054
|
// SERIAL_ECHOPGM(" addhome Theta="); SERIAL_ECHO(delta[X_AXIS]);
|
1055
|
1055
|
// SERIAL_ECHOPGM(" addhome Psi+Theta="); SERIAL_ECHOLN(delta[Y_AXIS]);
|
1056
|
1056
|
|
|
@@ -1068,14 +1068,14 @@ static void axis_is_at_home(int axis) {
|
1068
|
1068
|
}
|
1069
|
1069
|
else
|
1070
|
1070
|
{
|
1071
|
|
- current_position[axis] = base_home_pos(axis) + add_homing[axis];
|
1072
|
|
- min_pos[axis] = base_min_pos(axis) + add_homing[axis];
|
1073
|
|
- max_pos[axis] = base_max_pos(axis) + add_homing[axis];
|
|
1071
|
+ current_position[axis] = base_home_pos(axis) + home_offset[axis];
|
|
1072
|
+ min_pos[axis] = base_min_pos(axis) + home_offset[axis];
|
|
1073
|
+ max_pos[axis] = base_max_pos(axis) + home_offset[axis];
|
1074
|
1074
|
}
|
1075
|
1075
|
#else
|
1076
|
|
- current_position[axis] = base_home_pos(axis) + add_homing[axis];
|
1077
|
|
- min_pos[axis] = base_min_pos(axis) + add_homing[axis];
|
1078
|
|
- max_pos[axis] = base_max_pos(axis) + add_homing[axis];
|
|
1076
|
+ current_position[axis] = base_home_pos(axis) + home_offset[axis];
|
|
1077
|
+ min_pos[axis] = base_min_pos(axis) + home_offset[axis];
|
|
1078
|
+ max_pos[axis] = base_max_pos(axis) + home_offset[axis];
|
1079
|
1079
|
#endif
|
1080
|
1080
|
}
|
1081
|
1081
|
|
|
@@ -1309,7 +1309,13 @@ static void engage_z_probe() {
|
1309
|
1309
|
static void retract_z_probe() {
|
1310
|
1310
|
// Retract Z Servo endstop if enabled
|
1311
|
1311
|
#ifdef SERVO_ENDSTOPS
|
1312
|
|
- if (servo_endstops[Z_AXIS] > -1) {
|
|
1312
|
+ if (servo_endstops[Z_AXIS] > -1)
|
|
1313
|
+ {
|
|
1314
|
+ #if Z_RAISE_AFTER_PROBING > 0
|
|
1315
|
+ do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], Z_RAISE_AFTER_PROBING);
|
|
1316
|
+ st_synchronize();
|
|
1317
|
+ #endif
|
|
1318
|
+
|
1313
|
1319
|
#if SERVO_LEVELING
|
1314
|
1320
|
servos[servo_endstops[Z_AXIS]].attach(0);
|
1315
|
1321
|
#endif
|
|
@@ -1322,7 +1328,7 @@ static void retract_z_probe() {
|
1322
|
1328
|
#elif defined(Z_PROBE_ALLEN_KEY)
|
1323
|
1329
|
// Move up for safety
|
1324
|
1330
|
feedrate = homing_feedrate[X_AXIS];
|
1325
|
|
- destination[Z_AXIS] = current_position[Z_AXIS] + 20;
|
|
1331
|
+ destination[Z_AXIS] = current_position[Z_AXIS] + Z_RAISE_AFTER_PROBING;
|
1326
|
1332
|
prepare_move_raw();
|
1327
|
1333
|
|
1328
|
1334
|
// Move to the start position to initiate retraction
|
|
@@ -1364,10 +1370,15 @@ static void retract_z_probe() {
|
1364
|
1370
|
|
1365
|
1371
|
}
|
1366
|
1372
|
|
1367
|
|
-enum ProbeAction { ProbeStay, ProbeEngage, ProbeRetract, ProbeEngageRetract };
|
|
1373
|
+enum ProbeAction {
|
|
1374
|
+ ProbeStay = 0,
|
|
1375
|
+ ProbeEngage = BIT(0),
|
|
1376
|
+ ProbeRetract = BIT(1),
|
|
1377
|
+ ProbeEngageAndRetract = (ProbeEngage | ProbeRetract)
|
|
1378
|
+};
|
1368
|
1379
|
|
1369
|
1380
|
/// Probe bed height at position (x,y), returns the measured z value
|
1370
|
|
-static float probe_pt(float x, float y, float z_before, ProbeAction retract_action=ProbeEngageRetract, int verbose_level=1) {
|
|
1381
|
+static float probe_pt(float x, float y, float z_before, ProbeAction retract_action=ProbeEngageAndRetract, int verbose_level=1) {
|
1371
|
1382
|
// move to right place
|
1372
|
1383
|
do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], z_before);
|
1373
|
1384
|
do_blocking_move_to(x - X_PROBE_OFFSET_FROM_EXTRUDER, y - Y_PROBE_OFFSET_FROM_EXTRUDER, current_position[Z_AXIS]);
|
|
@@ -1858,7 +1869,7 @@ inline void gcode_G28() {
|
1858
|
1869
|
if (code_value_long() != 0) {
|
1859
|
1870
|
current_position[X_AXIS] = code_value()
|
1860
|
1871
|
#ifndef SCARA
|
1861
|
|
- + add_homing[X_AXIS]
|
|
1872
|
+ + home_offset[X_AXIS]
|
1862
|
1873
|
#endif
|
1863
|
1874
|
;
|
1864
|
1875
|
}
|
|
@@ -1867,7 +1878,7 @@ inline void gcode_G28() {
|
1867
|
1878
|
if (code_seen(axis_codes[Y_AXIS]) && code_value_long() != 0) {
|
1868
|
1879
|
current_position[Y_AXIS] = code_value()
|
1869
|
1880
|
#ifndef SCARA
|
1870
|
|
- + add_homing[Y_AXIS]
|
|
1881
|
+ + home_offset[Y_AXIS]
|
1871
|
1882
|
#endif
|
1872
|
1883
|
;
|
1873
|
1884
|
}
|
|
@@ -1941,7 +1952,7 @@ inline void gcode_G28() {
|
1941
|
1952
|
|
1942
|
1953
|
|
1943
|
1954
|
if (code_seen(axis_codes[Z_AXIS]) && code_value_long() != 0)
|
1944
|
|
- current_position[Z_AXIS] = code_value() + add_homing[Z_AXIS];
|
|
1955
|
+ current_position[Z_AXIS] = code_value() + home_offset[Z_AXIS];
|
1945
|
1956
|
|
1946
|
1957
|
#ifdef ENABLE_AUTO_BED_LEVELING
|
1947
|
1958
|
if (home_all_axis || code_seen(axis_codes[Z_AXIS]))
|
|
@@ -2166,7 +2177,7 @@ inline void gcode_G28() {
|
2166
|
2177
|
#ifdef AUTO_BED_LEVELING_GRID
|
2167
|
2178
|
|
2168
|
2179
|
#ifndef DELTA
|
2169
|
|
- bool topo_flag = verbose_level > 2 || code_seen('T') || code_seen('t');
|
|
2180
|
+ bool do_topography_map = verbose_level > 2 || code_seen('T') || code_seen('t');
|
2170
|
2181
|
#endif
|
2171
|
2182
|
|
2172
|
2183
|
if (verbose_level > 0)
|
|
@@ -2221,7 +2232,7 @@ inline void gcode_G28() {
|
2221
|
2232
|
|
2222
|
2233
|
#ifdef Z_PROBE_SLED
|
2223
|
2234
|
dock_sled(false); // engage (un-dock) the probe
|
2224
|
|
- #elif not defined(SERVO_ENDSTOPS)
|
|
2235
|
+ #elif defined(Z_PROBE_ALLEN_KEY)
|
2225
|
2236
|
engage_z_probe();
|
2226
|
2237
|
#endif
|
2227
|
2238
|
|
|
@@ -2271,42 +2282,36 @@ inline void gcode_G28() {
|
2271
|
2282
|
delta_grid_spacing[1] = yGridSpacing;
|
2272
|
2283
|
|
2273
|
2284
|
float z_offset = Z_PROBE_OFFSET_FROM_EXTRUDER;
|
2274
|
|
- if (code_seen(axis_codes[Z_AXIS])) {
|
2275
|
|
- z_offset += code_value();
|
2276
|
|
- }
|
|
2285
|
+ if (code_seen(axis_codes[Z_AXIS])) z_offset += code_value();
|
2277
|
2286
|
#endif
|
2278
|
2287
|
|
2279
|
2288
|
int probePointCounter = 0;
|
2280
|
2289
|
bool zig = true;
|
2281
|
2290
|
|
2282
|
|
- for (int yCount=0; yCount < auto_bed_leveling_grid_points; yCount++)
|
2283
|
|
- {
|
|
2291
|
+ for (int yCount = 0; yCount < auto_bed_leveling_grid_points; yCount++) {
|
2284
|
2292
|
double yProbe = front_probe_bed_position + yGridSpacing * yCount;
|
2285
|
2293
|
int xStart, xStop, xInc;
|
2286
|
2294
|
|
2287
|
|
- if (zig)
|
2288
|
|
- {
|
|
2295
|
+ if (zig) {
|
2289
|
2296
|
xStart = 0;
|
2290
|
2297
|
xStop = auto_bed_leveling_grid_points;
|
2291
|
2298
|
xInc = 1;
|
2292
|
2299
|
zig = false;
|
2293
|
2300
|
}
|
2294
|
|
- else
|
2295
|
|
- {
|
|
2301
|
+ else {
|
2296
|
2302
|
xStart = auto_bed_leveling_grid_points - 1;
|
2297
|
2303
|
xStop = -1;
|
2298
|
2304
|
xInc = -1;
|
2299
|
2305
|
zig = true;
|
2300
|
2306
|
}
|
2301
|
2307
|
|
2302
|
|
- #ifndef DELTA
|
2303
|
|
- // If topo_flag is set then don't zig-zag. Just scan in one direction.
|
2304
|
|
- // This gets the probe points in more readable order.
|
2305
|
|
- if (!topo_flag) zig = !zig;
|
2306
|
|
- #endif
|
|
2308
|
+ #ifndef DELTA
|
|
2309
|
+ // If do_topography_map is set then don't zig-zag. Just scan in one direction.
|
|
2310
|
+ // This gets the probe points in more readable order.
|
|
2311
|
+ if (!do_topography_map) zig = !zig;
|
|
2312
|
+ #endif
|
2307
|
2313
|
|
2308
|
|
- for (int xCount=xStart; xCount != xStop; xCount += xInc)
|
2309
|
|
- {
|
|
2314
|
+ for (int xCount = xStart; xCount != xStop; xCount += xInc) {
|
2310
|
2315
|
double xProbe = left_probe_bed_position + xGridSpacing * xCount;
|
2311
|
2316
|
|
2312
|
2317
|
// raise extruder
|
|
@@ -2331,7 +2336,7 @@ inline void gcode_G28() {
|
2331
|
2336
|
act = ProbeStay;
|
2332
|
2337
|
}
|
2333
|
2338
|
else
|
2334
|
|
- act = ProbeEngageRetract;
|
|
2339
|
+ act = ProbeEngageAndRetract;
|
2335
|
2340
|
|
2336
|
2341
|
measured_z = probe_pt(xProbe, yProbe, z_before, act, verbose_level);
|
2337
|
2342
|
|
|
@@ -2373,49 +2378,31 @@ inline void gcode_G28() {
|
2373
|
2378
|
}
|
2374
|
2379
|
}
|
2375
|
2380
|
|
2376
|
|
- if (topo_flag) {
|
2377
|
|
-
|
2378
|
|
- int xx, yy;
|
|
2381
|
+ // Show the Topography map if enabled
|
|
2382
|
+ if (do_topography_map) {
|
2379
|
2383
|
|
2380
|
2384
|
SERIAL_PROTOCOLPGM(" \nBed Height Topography: \n");
|
2381
|
|
- #if TOPO_ORIGIN == OriginFrontLeft
|
2382
|
|
- SERIAL_PROTOCOLPGM("+-----------+\n");
|
2383
|
|
- SERIAL_PROTOCOLPGM("|...Back....|\n");
|
2384
|
|
- SERIAL_PROTOCOLPGM("|Left..Right|\n");
|
2385
|
|
- SERIAL_PROTOCOLPGM("|...Front...|\n");
|
2386
|
|
- SERIAL_PROTOCOLPGM("+-----------+\n");
|
2387
|
|
- for (yy = auto_bed_leveling_grid_points - 1; yy >= 0; yy--)
|
2388
|
|
- #else
|
2389
|
|
- for (yy = 0; yy < auto_bed_leveling_grid_points; yy++)
|
2390
|
|
- #endif
|
2391
|
|
- {
|
2392
|
|
- #if TOPO_ORIGIN == OriginBackRight
|
2393
|
|
- for (xx = 0; xx < auto_bed_leveling_grid_points; xx++)
|
2394
|
|
- #else
|
2395
|
|
- for (xx = auto_bed_leveling_grid_points - 1; xx >= 0; xx--)
|
2396
|
|
- #endif
|
2397
|
|
- {
|
2398
|
|
- int ind =
|
2399
|
|
- #if TOPO_ORIGIN == OriginBackRight || TOPO_ORIGIN == OriginFrontLeft
|
2400
|
|
- yy * auto_bed_leveling_grid_points + xx
|
2401
|
|
- #elif TOPO_ORIGIN == OriginBackLeft
|
2402
|
|
- xx * auto_bed_leveling_grid_points + yy
|
2403
|
|
- #elif TOPO_ORIGIN == OriginFrontRight
|
2404
|
|
- abl2 - xx * auto_bed_leveling_grid_points - yy - 1
|
2405
|
|
- #endif
|
2406
|
|
- ;
|
2407
|
|
- float diff = eqnBVector[ind] - mean;
|
2408
|
|
- if (diff >= 0.0)
|
2409
|
|
- SERIAL_PROTOCOLPGM(" +"); // Include + for column alignment
|
2410
|
|
- else
|
2411
|
|
- SERIAL_PROTOCOLPGM(" ");
|
2412
|
|
- SERIAL_PROTOCOL_F(diff, 5);
|
2413
|
|
- } // xx
|
2414
|
|
- SERIAL_EOL;
|
2415
|
|
- } // yy
|
|
2385
|
+ SERIAL_PROTOCOLPGM("+-----------+\n");
|
|
2386
|
+ SERIAL_PROTOCOLPGM("|...Back....|\n");
|
|
2387
|
+ SERIAL_PROTOCOLPGM("|Left..Right|\n");
|
|
2388
|
+ SERIAL_PROTOCOLPGM("|...Front...|\n");
|
|
2389
|
+ SERIAL_PROTOCOLPGM("+-----------+\n");
|
|
2390
|
+
|
|
2391
|
+ for (int yy = auto_bed_leveling_grid_points - 1; yy >= 0; yy--) {
|
|
2392
|
+ for (int xx = auto_bed_leveling_grid_points - 1; xx >= 0; xx--) {
|
|
2393
|
+ int ind = yy * auto_bed_leveling_grid_points + xx;
|
|
2394
|
+ float diff = eqnBVector[ind] - mean;
|
|
2395
|
+ if (diff >= 0.0)
|
|
2396
|
+ SERIAL_PROTOCOLPGM(" +"); // Include + for column alignment
|
|
2397
|
+ else
|
|
2398
|
+ SERIAL_PROTOCOLPGM(" ");
|
|
2399
|
+ SERIAL_PROTOCOL_F(diff, 5);
|
|
2400
|
+ } // xx
|
2416
|
2401
|
SERIAL_EOL;
|
|
2402
|
+ } // yy
|
|
2403
|
+ SERIAL_EOL;
|
2417
|
2404
|
|
2418
|
|
- } //topo_flag
|
|
2405
|
+ } //do_topography_map
|
2419
|
2406
|
|
2420
|
2407
|
|
2421
|
2408
|
set_bed_level_equation_lsq(plane_equation_coefficients);
|
|
@@ -2437,18 +2424,15 @@ inline void gcode_G28() {
|
2437
|
2424
|
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);
|
2438
|
2425
|
}
|
2439
|
2426
|
else {
|
2440
|
|
- z_at_pt_1 = probe_pt(ABL_PROBE_PT_1_X, ABL_PROBE_PT_1_Y, Z_RAISE_BEFORE_PROBING, verbose_level=verbose_level);
|
2441
|
|
- 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);
|
2442
|
|
- 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);
|
|
2427
|
+ z_at_pt_1 = probe_pt(ABL_PROBE_PT_1_X, ABL_PROBE_PT_1_Y, Z_RAISE_BEFORE_PROBING, ProbeEngageAndRetract, verbose_level);
|
|
2428
|
+ 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);
|
|
2429
|
+ 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);
|
2443
|
2430
|
}
|
2444
|
2431
|
clean_up_after_endstop_move();
|
2445
|
2432
|
set_bed_level_equation_3pts(z_at_pt_1, z_at_pt_2, z_at_pt_3);
|
2446
|
2433
|
|
2447
|
2434
|
#endif // !AUTO_BED_LEVELING_GRID
|
2448
|
2435
|
|
2449
|
|
- do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], Z_RAISE_AFTER_PROBING);
|
2450
|
|
- st_synchronize();
|
2451
|
|
-
|
2452
|
2436
|
#ifndef DELTA
|
2453
|
2437
|
if (verbose_level > 0)
|
2454
|
2438
|
plan_bed_level_matrix.debug(" \n\nBed Level Correction Matrix:");
|
|
@@ -2468,7 +2452,7 @@ inline void gcode_G28() {
|
2468
|
2452
|
|
2469
|
2453
|
#ifdef Z_PROBE_SLED
|
2470
|
2454
|
dock_sled(true, -SLED_DOCKING_OFFSET); // dock the probe, correcting for over-travel
|
2471
|
|
- #elif not defined(SERVO_ENDSTOPS)
|
|
2455
|
+ #elif defined(Z_PROBE_ALLEN_KEY)
|
2472
|
2456
|
retract_z_probe();
|
2473
|
2457
|
#endif
|
2474
|
2458
|
|
|
@@ -2513,22 +2497,13 @@ inline void gcode_G92() {
|
2513
|
2497
|
if (!code_seen(axis_codes[E_AXIS]))
|
2514
|
2498
|
st_synchronize();
|
2515
|
2499
|
|
2516
|
|
- for (int i=0;i<NUM_AXIS;i++) {
|
|
2500
|
+ for (int i = 0; i < NUM_AXIS; i++) {
|
2517
|
2501
|
if (code_seen(axis_codes[i])) {
|
2518
|
|
- if (i == E_AXIS) {
|
2519
|
|
- current_position[i] = code_value();
|
|
2502
|
+ current_position[i] = code_value();
|
|
2503
|
+ if (i == E_AXIS)
|
2520
|
2504
|
plan_set_e_position(current_position[E_AXIS]);
|
2521
|
|
- }
|
2522
|
|
- else {
|
2523
|
|
- current_position[i] = code_value() +
|
2524
|
|
- #ifdef SCARA
|
2525
|
|
- ((i != X_AXIS && i != Y_AXIS) ? add_homing[i] : 0)
|
2526
|
|
- #else
|
2527
|
|
- add_homing[i]
|
2528
|
|
- #endif
|
2529
|
|
- ;
|
|
2505
|
+ else
|
2530
|
2506
|
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
|
2531
|
|
- }
|
2532
|
2507
|
}
|
2533
|
2508
|
}
|
2534
|
2509
|
}
|
|
@@ -3465,9 +3440,9 @@ inline void gcode_M114() {
|
3465
|
3440
|
SERIAL_PROTOCOLLN("");
|
3466
|
3441
|
|
3467
|
3442
|
SERIAL_PROTOCOLPGM("SCARA Cal - Theta:");
|
3468
|
|
- SERIAL_PROTOCOL(delta[X_AXIS]+add_homing[X_AXIS]);
|
|
3443
|
+ SERIAL_PROTOCOL(delta[X_AXIS]+home_offset[X_AXIS]);
|
3469
|
3444
|
SERIAL_PROTOCOLPGM(" Psi+Theta (90):");
|
3470
|
|
- SERIAL_PROTOCOL(delta[Y_AXIS]-delta[X_AXIS]-90+add_homing[Y_AXIS]);
|
|
3445
|
+ SERIAL_PROTOCOL(delta[Y_AXIS]-delta[X_AXIS]-90+home_offset[Y_AXIS]);
|
3471
|
3446
|
SERIAL_PROTOCOLLN("");
|
3472
|
3447
|
|
3473
|
3448
|
SERIAL_PROTOCOLPGM("SCARA step Cal - Theta:");
|
|
@@ -3685,12 +3660,12 @@ inline void gcode_M205() {
|
3685
|
3660
|
inline void gcode_M206() {
|
3686
|
3661
|
for (int8_t i=X_AXIS; i <= Z_AXIS; i++) {
|
3687
|
3662
|
if (code_seen(axis_codes[i])) {
|
3688
|
|
- add_homing[i] = code_value();
|
|
3663
|
+ home_offset[i] = code_value();
|
3689
|
3664
|
}
|
3690
|
3665
|
}
|
3691
|
3666
|
#ifdef SCARA
|
3692
|
|
- if (code_seen('T')) add_homing[X_AXIS] = code_value(); // Theta
|
3693
|
|
- if (code_seen('P')) add_homing[Y_AXIS] = code_value(); // Psi
|
|
3667
|
+ if (code_seen('T')) home_offset[X_AXIS] = code_value(); // Theta
|
|
3668
|
+ if (code_seen('P')) home_offset[Y_AXIS] = code_value(); // Psi
|
3694
|
3669
|
#endif
|
3695
|
3670
|
}
|
3696
|
3671
|
|
|
@@ -5288,7 +5263,7 @@ void clamp_to_software_endstops(float target[3])
|
5288
|
5263
|
float negative_z_offset = 0;
|
5289
|
5264
|
#ifdef ENABLE_AUTO_BED_LEVELING
|
5290
|
5265
|
if (Z_PROBE_OFFSET_FROM_EXTRUDER < 0) negative_z_offset = negative_z_offset + Z_PROBE_OFFSET_FROM_EXTRUDER;
|
5291
|
|
- if (add_homing[Z_AXIS] < 0) negative_z_offset = negative_z_offset + add_homing[Z_AXIS];
|
|
5266
|
+ if (home_offset[Z_AXIS] < 0) negative_z_offset = negative_z_offset + home_offset[Z_AXIS];
|
5292
|
5267
|
#endif
|
5293
|
5268
|
|
5294
|
5269
|
if (target[Z_AXIS] < min_pos[Z_AXIS]+negative_z_offset) target[Z_AXIS] = min_pos[Z_AXIS]+negative_z_offset;
|