|
@@ -226,21 +226,21 @@ float min_pos[3] = { X_MIN_POS, Y_MIN_POS, Z_MIN_POS };
|
226
|
226
|
float max_pos[3] = { X_MAX_POS, Y_MAX_POS, Z_MAX_POS };
|
227
|
227
|
bool axis_known_position[3] = { false };
|
228
|
228
|
|
229
|
|
-// Extruder offset
|
|
229
|
+// Extruder offsets
|
230
|
230
|
#if EXTRUDERS > 1
|
231
|
231
|
#ifndef EXTRUDER_OFFSET_X
|
232
|
|
- #define EXTRUDER_OFFSET_X 0
|
|
232
|
+ #define EXTRUDER_OFFSET_X { 0 }
|
233
|
233
|
#endif
|
234
|
234
|
#ifndef EXTRUDER_OFFSET_Y
|
235
|
|
- #define EXTRUDER_OFFSET_Y 0
|
|
235
|
+ #define EXTRUDER_OFFSET_Y { 0 }
|
236
|
236
|
#endif
|
237
|
|
- #ifndef DUAL_X_CARRIAGE
|
238
|
|
- #define NUM_EXTRUDER_OFFSETS 2 // only in XY plane
|
239
|
|
- #else
|
240
|
|
- #define NUM_EXTRUDER_OFFSETS 3 // supports offsets in XYZ plane
|
241
|
|
- #endif
|
242
|
|
- #define _EXY { EXTRUDER_OFFSET_X, EXTRUDER_OFFSET_Y }
|
243
|
|
- float extruder_offset[EXTRUDERS][NUM_EXTRUDER_OFFSETS] = ARRAY_BY_EXTRUDERS(_EXY, _EXY, _EXY, _EXY);
|
|
237
|
+ float extruder_offset[][EXTRUDERS] = {
|
|
238
|
+ EXTRUDER_OFFSET_X,
|
|
239
|
+ EXTRUDER_OFFSET_Y
|
|
240
|
+ #ifdef DUAL_X_CARRIAGE
|
|
241
|
+ , { 0 } // supports offsets in XYZ plane
|
|
242
|
+ #endif
|
|
243
|
+ };
|
244
|
244
|
#endif
|
245
|
245
|
|
246
|
246
|
uint8_t active_extruder = 0;
|
|
@@ -935,7 +935,7 @@ XYZ_CONSTS_FROM_CONFIG(signed char, home_dir, HOME_DIR);
|
935
|
935
|
// second X-carriage offset when homed - otherwise X2_HOME_POS is used.
|
936
|
936
|
// This allow soft recalibration of the second extruder offset position without firmware reflash
|
937
|
937
|
// (through the M218 command).
|
938
|
|
- return (extruder_offset[1][X_AXIS] > 0) ? extruder_offset[1][X_AXIS] : X2_HOME_POS;
|
|
938
|
+ return (extruder_offset[X_AXIS][1] > 0) ? extruder_offset[X_AXIS][1] : X2_HOME_POS;
|
939
|
939
|
}
|
940
|
940
|
|
941
|
941
|
static int x_home_dir(int extruder) {
|
|
@@ -959,14 +959,14 @@ static void axis_is_at_home(int axis) {
|
959
|
959
|
if (active_extruder != 0) {
|
960
|
960
|
current_position[X_AXIS] = x_home_pos(active_extruder);
|
961
|
961
|
min_pos[X_AXIS] = X2_MIN_POS;
|
962
|
|
- max_pos[X_AXIS] = max(extruder_offset[1][X_AXIS], X2_MAX_POS);
|
|
962
|
+ max_pos[X_AXIS] = max(extruder_offset[X_AXIS][1], X2_MAX_POS);
|
963
|
963
|
return;
|
964
|
964
|
}
|
965
|
965
|
else if (dual_x_carriage_mode == DXC_DUPLICATION_MODE) {
|
966
|
966
|
float xoff = home_offset[X_AXIS];
|
967
|
967
|
current_position[X_AXIS] = base_home_pos(X_AXIS) + xoff;
|
968
|
968
|
min_pos[X_AXIS] = base_min_pos(X_AXIS) + xoff;
|
969
|
|
- max_pos[X_AXIS] = min(base_max_pos(X_AXIS) + xoff, max(extruder_offset[1][X_AXIS], X2_MAX_POS) - duplicate_extruder_x_offset);
|
|
969
|
+ max_pos[X_AXIS] = min(base_max_pos(X_AXIS) + xoff, max(extruder_offset[X_AXIS][1], X2_MAX_POS) - duplicate_extruder_x_offset);
|
970
|
970
|
return;
|
971
|
971
|
}
|
972
|
972
|
}
|
|
@@ -1055,7 +1055,7 @@ inline void sync_plan_position() {
|
1055
|
1055
|
//corrected_position.debug("position after");
|
1056
|
1056
|
current_position[X_AXIS] = corrected_position.x;
|
1057
|
1057
|
current_position[Y_AXIS] = corrected_position.y;
|
1058
|
|
- current_position[Z_AXIS] = zprobe_zoffset; // was: corrected_position.z
|
|
1058
|
+ current_position[Z_AXIS] = corrected_position.z;
|
1059
|
1059
|
|
1060
|
1060
|
sync_plan_position();
|
1061
|
1061
|
}
|
|
@@ -1084,7 +1084,7 @@ inline void sync_plan_position() {
|
1084
|
1084
|
vector_3 corrected_position = plan_get_position();
|
1085
|
1085
|
current_position[X_AXIS] = corrected_position.x;
|
1086
|
1086
|
current_position[Y_AXIS] = corrected_position.y;
|
1087
|
|
- current_position[Z_AXIS] = zprobe_zoffset; // was: corrected_position.z
|
|
1087
|
+ current_position[Z_AXIS] = corrected_position.z;
|
1088
|
1088
|
|
1089
|
1089
|
sync_plan_position();
|
1090
|
1090
|
}
|
|
@@ -1202,58 +1202,6 @@ inline void sync_plan_position() {
|
1202
|
1202
|
previous_millis_cmd = millis();
|
1203
|
1203
|
}
|
1204
|
1204
|
|
1205
|
|
-<<<<<<< HEAD
|
1206
|
|
-static void engage_z_probe() {
|
1207
|
|
- // Engage Z Servo endstop if enabled
|
1208
|
|
- #ifdef SERVO_ENDSTOPS
|
1209
|
|
- if (servo_endstops[Z_AXIS] > -1) {
|
1210
|
|
- #if SERVO_LEVELING
|
1211
|
|
- servos[servo_endstops[Z_AXIS]].attach(0);
|
1212
|
|
- #endif
|
1213
|
|
- servos[servo_endstops[Z_AXIS]].write(servo_endstop_angles[Z_AXIS * 2]);
|
1214
|
|
- #if SERVO_LEVELING
|
1215
|
|
- delay(PROBE_SERVO_DEACTIVATION_DELAY);
|
1216
|
|
- servos[servo_endstops[Z_AXIS]].detach();
|
1217
|
|
- #endif
|
1218
|
|
- }
|
1219
|
|
- #elif defined(Z_PROBE_ALLEN_KEY)
|
1220
|
|
- feedrate = homing_feedrate[X_AXIS];
|
1221
|
|
-
|
1222
|
|
- // Move to the start position to initiate deployment
|
1223
|
|
- destination[X_AXIS] = Z_PROBE_ALLEN_KEY_DEPLOY_X;
|
1224
|
|
- destination[Y_AXIS] = Z_PROBE_ALLEN_KEY_DEPLOY_Y;
|
1225
|
|
- destination[Z_AXIS] = Z_PROBE_ALLEN_KEY_DEPLOY_Z;
|
1226
|
|
- prepare_move_raw();
|
1227
|
|
-
|
1228
|
|
- // Home X to touch the belt
|
1229
|
|
- feedrate = homing_feedrate[X_AXIS]/10;
|
1230
|
|
- destination[X_AXIS] = 0;
|
1231
|
|
- prepare_move_raw();
|
1232
|
|
-
|
1233
|
|
- // Home Y for safety
|
1234
|
|
- feedrate = homing_feedrate[X_AXIS]/2;
|
1235
|
|
- destination[Y_AXIS] = 0;
|
1236
|
|
- prepare_move_raw();
|
1237
|
|
-
|
1238
|
|
- st_synchronize();
|
1239
|
|
-
|
1240
|
|
- // If Z_PROBE_AND_ENDSTOP is changed to completely break it's bonds from Z_MIN_ENDSTOP and become
|
1241
|
|
- // it's own unique entity, then the following logic will need to be modified
|
1242
|
|
- // so it only uses the Z_PROBE
|
1243
|
|
- #if defined(Z_PROBE_AND_ENDSTOP)
|
1244
|
|
- bool z_probe_endstop = (READ(Z_PROBE_PIN) != Z_PROBE_ENDSTOP_INVERTING);
|
1245
|
|
- if (z_probe_endstop)
|
1246
|
|
- #else
|
1247
|
|
- bool z_min_endstop = (READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING);
|
1248
|
|
- if (z_min_endstop)
|
1249
|
|
- #endif
|
1250
|
|
- {
|
1251
|
|
- if (!Stopped)
|
1252
|
|
- {
|
1253
|
|
- SERIAL_ERROR_START;
|
1254
|
|
- SERIAL_ERRORLNPGM("Z-Probe failed to engage!");
|
1255
|
|
- LCD_ALERTMESSAGEPGM("Err: ZPROBE");
|
1256
|
|
-=======
|
1257
|
1205
|
static void engage_z_probe() {
|
1258
|
1206
|
|
1259
|
1207
|
#ifdef SERVO_ENDSTOPS
|
|
@@ -1292,107 +1240,43 @@ static void engage_z_probe() {
|
1292
|
1240
|
|
1293
|
1241
|
st_synchronize();
|
1294
|
1242
|
|
|
1243
|
+ #if defined(Z_PROBE_AND_ENDSTOP)
|
|
1244
|
+ bool z_probe_endstop = (READ(Z_PROBE_PIN) != Z_PROBE_ENDSTOP_INVERTING);
|
|
1245
|
+ if (z_probe_endstop) {
|
|
1246
|
+ #else
|
1295
|
1247
|
bool z_min_endstop = (READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING);
|
1296
|
|
- if (z_min_endstop) {
|
|
1248
|
+ if (!z_min_endstop) {
|
|
1249
|
+ #endif
|
1297
|
1250
|
if (!Stopped) {
|
1298
|
1251
|
SERIAL_ERROR_START;
|
1299
|
1252
|
SERIAL_ERRORLNPGM("Z-Probe failed to engage!");
|
1300
|
1253
|
LCD_ALERTMESSAGEPGM("Err: ZPROBE");
|
1301
|
|
->>>>>>> MarlinFirmware/Development
|
1302
|
1254
|
}
|
1303
|
1255
|
Stop();
|
1304
|
1256
|
}
|
1305
|
1257
|
|
1306
|
1258
|
#endif // Z_PROBE_ALLEN_KEY
|
1307
|
|
-
|
1308
|
|
-<<<<<<< HEAD
|
1309
|
|
-static void retract_z_probe() {
|
1310
|
|
- // Retract Z Servo endstop if enabled
|
1311
|
|
- #ifdef SERVO_ENDSTOPS
|
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
|
|
-
|
1319
|
|
- #if SERVO_LEVELING
|
1320
|
|
- servos[servo_endstops[Z_AXIS]].attach(0);
|
1321
|
|
- #endif
|
1322
|
|
- servos[servo_endstops[Z_AXIS]].write(servo_endstop_angles[Z_AXIS * 2 + 1]);
|
1323
|
|
- #if SERVO_LEVELING
|
1324
|
|
- delay(PROBE_SERVO_DEACTIVATION_DELAY);
|
1325
|
|
- servos[servo_endstops[Z_AXIS]].detach();
|
1326
|
|
- #endif
|
1327
|
|
- }
|
1328
|
|
- #elif defined(Z_PROBE_ALLEN_KEY)
|
1329
|
|
- // Move up for safety
|
1330
|
|
- feedrate = homing_feedrate[X_AXIS];
|
1331
|
|
- destination[Z_AXIS] = current_position[Z_AXIS] + Z_RAISE_AFTER_PROBING;
|
1332
|
|
- prepare_move_raw();
|
1333
|
|
-
|
1334
|
|
- // Move to the start position to initiate retraction
|
1335
|
|
- destination[X_AXIS] = Z_PROBE_ALLEN_KEY_RETRACT_X;
|
1336
|
|
- destination[Y_AXIS] = Z_PROBE_ALLEN_KEY_RETRACT_Y;
|
1337
|
|
- destination[Z_AXIS] = Z_PROBE_ALLEN_KEY_RETRACT_Z;
|
1338
|
|
- prepare_move_raw();
|
1339
|
|
-
|
1340
|
|
- // Move the nozzle down to push the probe into retracted position
|
1341
|
|
- feedrate = homing_feedrate[Z_AXIS]/10;
|
1342
|
|
- destination[Z_AXIS] = current_position[Z_AXIS] - Z_PROBE_ALLEN_KEY_RETRACT_DEPTH;
|
1343
|
|
- prepare_move_raw();
|
1344
|
|
-
|
1345
|
|
- // Move up for safety
|
1346
|
|
- feedrate = homing_feedrate[Z_AXIS]/2;
|
1347
|
|
- destination[Z_AXIS] = current_position[Z_AXIS] + Z_PROBE_ALLEN_KEY_RETRACT_DEPTH * 2;
|
1348
|
|
- prepare_move_raw();
|
1349
|
|
-
|
1350
|
|
- // Home XY for safety
|
1351
|
|
- feedrate = homing_feedrate[X_AXIS]/2;
|
1352
|
|
- destination[X_AXIS] = 0;
|
1353
|
|
- destination[Y_AXIS] = 0;
|
1354
|
|
- prepare_move_raw();
|
1355
|
|
-
|
1356
|
|
- st_synchronize();
|
1357
|
|
-
|
1358
|
|
- // If Z_PROBE_AND_ENDSTOP is changed to completely break it's bonds from Z_MIN_ENDSTOP and become
|
1359
|
|
- // it's own unique entity, then the following logic will need to be modified
|
1360
|
|
- // so it only uses the Z_PROBE
|
1361
|
|
- #if defined(Z_PROBE_AND_ENDSTOP)
|
1362
|
|
- bool z_probe_endstop = (READ(Z_PROBE_PIN) != Z_PROBE_ENDSTOP_INVERTING);
|
1363
|
|
- if (z_probe_endstop)
|
1364
|
|
- #else
|
1365
|
|
- bool z_min_endstop = (READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING);
|
1366
|
|
- if (z_min_endstop)
|
1367
|
|
- #endif
|
1368
|
|
- {
|
1369
|
|
- if (!Stopped)
|
1370
|
|
- {
|
1371
|
|
- SERIAL_ERROR_START;
|
1372
|
|
- SERIAL_ERRORLNPGM("Z-Probe failed to retract!");
|
1373
|
|
- LCD_ALERTMESSAGEPGM("Err: ZPROBE");
|
1374
|
|
-=======
|
|
1259
|
+
|
1375
|
1260
|
}
|
1376
|
1261
|
|
1377
|
|
- static void retract_z_probe(const float z_after=Z_RAISE_AFTER_PROBING) {
|
|
1262
|
+ static void retract_z_probe() {
|
1378
|
1263
|
|
1379
|
1264
|
#ifdef SERVO_ENDSTOPS
|
1380
|
1265
|
|
1381
|
1266
|
// Retract Z Servo endstop if enabled
|
1382
|
1267
|
if (servo_endstops[Z_AXIS] >= 0) {
|
1383
|
1268
|
|
1384
|
|
- if (z_after > 0) {
|
1385
|
|
- do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], z_after);
|
|
1269
|
+ #if Z_RAISE_AFTER_PROBING > 0
|
|
1270
|
+ do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], Z_RAISE_AFTER_PROBING);
|
1386
|
1271
|
st_synchronize();
|
1387
|
|
->>>>>>> MarlinFirmware/Development
|
1388
|
|
- }
|
|
1272
|
+ #endif
|
1389
|
1273
|
|
1390
|
1274
|
#if SERVO_LEVELING
|
1391
|
1275
|
servos[servo_endstops[Z_AXIS]].attach(0);
|
1392
|
1276
|
#endif
|
1393
|
|
-
|
1394
|
|
- servos[servo_endstops[Z_AXIS]].write(servo_endstop_angles[Z_AXIS * 2 + 1]);
|
1395
|
|
-
|
|
1277
|
+
|
|
1278
|
+ servos[servo_endstops[Z_AXIS]].write(servo_endstop_angles[Z_AXIS * 2 + 1]);
|
|
1279
|
+
|
1396
|
1280
|
#if SERVO_LEVELING
|
1397
|
1281
|
delay(PROBE_SERVO_DEACTIVATION_DELAY);
|
1398
|
1282
|
servos[servo_endstops[Z_AXIS]].detach();
|
|
@@ -1430,11 +1314,13 @@ static void retract_z_probe() {
|
1430
|
1314
|
|
1431
|
1315
|
st_synchronize();
|
1432
|
1316
|
|
1433
|
|
- // If Z_PROBE_AND_ENDSTOP is changed to completely break it's bonds from Z_MIN_ENDSTOP and become
|
1434
|
|
- // it's own unique entity, then the following logic will need to be modified
|
1435
|
|
- // so it only uses the Z_PROBE
|
|
1317
|
+ #if defined(Z_PROBE_AND_ENDSTOP)
|
|
1318
|
+ bool z_probe_endstop = (READ(Z_PROBE_PIN) != Z_PROBE_ENDSTOP_INVERTING);
|
|
1319
|
+ if (z_probe_endstop) {
|
|
1320
|
+ #else
|
1436
|
1321
|
bool z_min_endstop = (READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING);
|
1437
|
1322
|
if (!z_min_endstop) {
|
|
1323
|
+ #endif
|
1438
|
1324
|
if (!Stopped) {
|
1439
|
1325
|
SERIAL_ERROR_START;
|
1440
|
1326
|
SERIAL_ERRORLNPGM("Z-Probe failed to retract!");
|
|
@@ -1467,8 +1353,15 @@ static void retract_z_probe() {
|
1467
|
1353
|
run_z_probe();
|
1468
|
1354
|
float measured_z = current_position[Z_AXIS];
|
1469
|
1355
|
|
|
1356
|
+ #if Z_RAISE_BETWEEN_PROBINGS > 0
|
|
1357
|
+ if (retract_action == ProbeStay) {
|
|
1358
|
+ do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], Z_RAISE_BETWEEN_PROBINGS);
|
|
1359
|
+ st_synchronize();
|
|
1360
|
+ }
|
|
1361
|
+ #endif
|
|
1362
|
+
|
1470
|
1363
|
#if !defined(Z_PROBE_SLED) && !defined(Z_PROBE_ALLEN_KEY)
|
1471
|
|
- if (retract_action & ProbeRetract) retract_z_probe(z_before);
|
|
1364
|
+ if (retract_action & ProbeRetract) retract_z_probe();
|
1472
|
1365
|
#endif
|
1473
|
1366
|
|
1474
|
1367
|
if (verbose_level > 2) {
|
|
@@ -1583,23 +1476,6 @@ static void homeaxis(int axis) {
|
1583
|
1476
|
|
1584
|
1477
|
#endif // Z_PROBE_SLED
|
1585
|
1478
|
|
1586
|
|
-<<<<<<< HEAD
|
1587
|
|
-#ifndef Z_PROBE_SLED
|
1588
|
|
- // Engage Servo endstop if enabled and we are not using Z_PROBE_AND_ENDSTOP unless we are using Z_SAFE_HOMING
|
1589
|
|
- #ifdef SERVO_ENDSTOPS && (defined (Z_SAFE_HOMING) || ! defined (Z_PROBE_AND_ENDSTOP))
|
1590
|
|
- #if SERVO_LEVELING
|
1591
|
|
- if (axis==Z_AXIS) {
|
1592
|
|
- engage_z_probe();
|
1593
|
|
- }
|
1594
|
|
- else
|
1595
|
|
- #endif
|
1596
|
|
- if (servo_endstops[axis] > -1) {
|
1597
|
|
- servos[servo_endstops[axis]].write(servo_endstop_angles[axis * 2]);
|
1598
|
|
- }
|
1599
|
|
- #endif
|
1600
|
|
-#endif // Z_PROBE_SLED
|
1601
|
|
-=======
|
1602
|
|
->>>>>>> MarlinFirmware/Development
|
1603
|
1479
|
#ifdef Z_DUAL_ENDSTOPS
|
1604
|
1480
|
if (axis == Z_AXIS) In_Homing_Process(true);
|
1605
|
1481
|
#endif
|
|
@@ -3921,23 +3797,23 @@ inline void gcode_M206() {
|
3921
|
3797
|
inline void gcode_M218() {
|
3922
|
3798
|
if (setTargetedHotend(218)) return;
|
3923
|
3799
|
|
3924
|
|
- if (code_seen('X')) extruder_offset[tmp_extruder][X_AXIS] = code_value();
|
3925
|
|
- if (code_seen('Y')) extruder_offset[tmp_extruder][Y_AXIS] = code_value();
|
|
3800
|
+ if (code_seen('X')) extruder_offset[X_AXIS][tmp_extruder] = code_value();
|
|
3801
|
+ if (code_seen('Y')) extruder_offset[Y_AXIS][tmp_extruder] = code_value();
|
3926
|
3802
|
|
3927
|
3803
|
#ifdef DUAL_X_CARRIAGE
|
3928
|
|
- if (code_seen('Z')) extruder_offset[tmp_extruder][Z_AXIS] = code_value();
|
|
3804
|
+ if (code_seen('Z')) extruder_offset[Z_AXIS][tmp_extruder] = code_value();
|
3929
|
3805
|
#endif
|
3930
|
3806
|
|
3931
|
3807
|
SERIAL_ECHO_START;
|
3932
|
3808
|
SERIAL_ECHOPGM(MSG_HOTEND_OFFSET);
|
3933
|
3809
|
for (tmp_extruder = 0; tmp_extruder < EXTRUDERS; tmp_extruder++) {
|
3934
|
3810
|
SERIAL_ECHO(" ");
|
3935
|
|
- SERIAL_ECHO(extruder_offset[tmp_extruder][X_AXIS]);
|
|
3811
|
+ SERIAL_ECHO(extruder_offset[X_AXIS][tmp_extruder]);
|
3936
|
3812
|
SERIAL_ECHO(",");
|
3937
|
|
- SERIAL_ECHO(extruder_offset[tmp_extruder][Y_AXIS]);
|
|
3813
|
+ SERIAL_ECHO(extruder_offset[Y_AXIS][tmp_extruder]);
|
3938
|
3814
|
#ifdef DUAL_X_CARRIAGE
|
3939
|
3815
|
SERIAL_ECHO(",");
|
3940
|
|
- SERIAL_ECHO(extruder_offset[tmp_extruder][Z_AXIS]);
|
|
3816
|
+ SERIAL_ECHO(extruder_offset[Z_AXIS][tmp_extruder]);
|
3941
|
3817
|
#endif
|
3942
|
3818
|
}
|
3943
|
3819
|
SERIAL_EOL;
|
|
@@ -4628,13 +4504,13 @@ inline void gcode_M503() {
|
4628
|
4504
|
SERIAL_ECHO_START;
|
4629
|
4505
|
SERIAL_ECHOPGM(MSG_HOTEND_OFFSET);
|
4630
|
4506
|
SERIAL_ECHO(" ");
|
4631
|
|
- SERIAL_ECHO(extruder_offset[0][X_AXIS]);
|
|
4507
|
+ SERIAL_ECHO(extruder_offset[X_AXIS][0]);
|
4632
|
4508
|
SERIAL_ECHO(",");
|
4633
|
|
- SERIAL_ECHO(extruder_offset[0][Y_AXIS]);
|
|
4509
|
+ SERIAL_ECHO(extruder_offset[Y_AXIS][0]);
|
4634
|
4510
|
SERIAL_ECHO(" ");
|
4635
|
4511
|
SERIAL_ECHO(duplicate_extruder_x_offset);
|
4636
|
4512
|
SERIAL_ECHO(",");
|
4637
|
|
- SERIAL_ECHOLN(extruder_offset[1][Y_AXIS]);
|
|
4513
|
+ SERIAL_ECHOLN(extruder_offset[Y_AXIS][1]);
|
4638
|
4514
|
break;
|
4639
|
4515
|
case DXC_FULL_CONTROL_MODE:
|
4640
|
4516
|
case DXC_AUTO_PARK_MODE:
|
|
@@ -4769,11 +4645,11 @@ inline void gcode_T() {
|
4769
|
4645
|
|
4770
|
4646
|
// apply Y & Z extruder offset (x offset is already used in determining home pos)
|
4771
|
4647
|
current_position[Y_AXIS] = current_position[Y_AXIS] -
|
4772
|
|
- extruder_offset[active_extruder][Y_AXIS] +
|
4773
|
|
- extruder_offset[tmp_extruder][Y_AXIS];
|
|
4648
|
+ extruder_offset[Y_AXIS][active_extruder] +
|
|
4649
|
+ extruder_offset[Y_AXIS][tmp_extruder];
|
4774
|
4650
|
current_position[Z_AXIS] = current_position[Z_AXIS] -
|
4775
|
|
- extruder_offset[active_extruder][Z_AXIS] +
|
4776
|
|
- extruder_offset[tmp_extruder][Z_AXIS];
|
|
4651
|
+ extruder_offset[Z_AXIS][active_extruder] +
|
|
4652
|
+ extruder_offset[Z_AXIS][tmp_extruder];
|
4777
|
4653
|
|
4778
|
4654
|
active_extruder = tmp_extruder;
|
4779
|
4655
|
|
|
@@ -4803,7 +4679,7 @@ inline void gcode_T() {
|
4803
|
4679
|
#else // !DUAL_X_CARRIAGE
|
4804
|
4680
|
// Offset extruder (only by XY)
|
4805
|
4681
|
for (int i=X_AXIS; i<=Y_AXIS; i++)
|
4806
|
|
- current_position[i] += extruder_offset[tmp_extruder][i] - extruder_offset[active_extruder][i];
|
|
4682
|
+ current_position[i] += extruder_offset[i][tmp_extruder] - extruder_offset[i][active_extruder];
|
4807
|
4683
|
// Set the new active extruder and position
|
4808
|
4684
|
active_extruder = tmp_extruder;
|
4809
|
4685
|
#endif // !DUAL_X_CARRIAGE
|