|
@@ -139,6 +139,7 @@
|
139
|
139
|
// M503 - print the current settings (from memory not from eeprom)
|
140
|
140
|
// M540 - Use S[0|1] to enable or disable the stop SD card print on endstop hit (requires ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
|
141
|
141
|
// M600 - Pause for filament change X[pos] Y[pos] Z[relative lift] E[initial retract] L[later retract distance for removal]
|
|
142
|
+// M605 - Set dual x-carriage movement mode: S<mode> [ X<duplication x-offset> R<duplication temp offset> ]
|
142
|
143
|
// M907 - Set digital trimpot motor current using axis codes.
|
143
|
144
|
// M908 - Control digital trimpot directly.
|
144
|
145
|
// M350 - Set microstepping mode.
|
|
@@ -168,9 +169,15 @@ float current_position[NUM_AXIS] = { 0.0, 0.0, 0.0, 0.0 };
|
168
|
169
|
float add_homeing[3]={0,0,0};
|
169
|
170
|
float min_pos[3] = { X_MIN_POS, Y_MIN_POS, Z_MIN_POS };
|
170
|
171
|
float max_pos[3] = { X_MAX_POS, Y_MAX_POS, Z_MAX_POS };
|
171
|
|
-// Extruder offset, only in XY plane
|
|
172
|
+
|
|
173
|
+// Extruder offset
|
172
|
174
|
#if EXTRUDERS > 1
|
173
|
|
-float extruder_offset[2][EXTRUDERS] = {
|
|
175
|
+#ifndef DUAL_X_CARRIAGE
|
|
176
|
+ #define NUM_EXTRUDER_OFFSETS 2 // only in XY plane
|
|
177
|
+#else
|
|
178
|
+ #define NUM_EXTRUDER_OFFSETS 3 // supports offsets in XYZ plane
|
|
179
|
+#endif
|
|
180
|
+float extruder_offset[NUM_EXTRUDER_OFFSETS][EXTRUDERS] = {
|
174
|
181
|
#if defined(EXTRUDER_OFFSET_X) && defined(EXTRUDER_OFFSET_Y)
|
175
|
182
|
EXTRUDER_OFFSET_X, EXTRUDER_OFFSET_Y
|
176
|
183
|
#endif
|
|
@@ -691,8 +698,13 @@ XYZ_CONSTS_FROM_CONFIG(signed char, home_dir, HOME_DIR);
|
691
|
698
|
#endif
|
692
|
699
|
#if X_HOME_DIR != -1 || X2_HOME_DIR != 1
|
693
|
700
|
#error "Please use canonical x-carriage assignment" // the x-carriages are defined by their homing directions
|
694
|
|
- #endif
|
|
701
|
+ #endif
|
695
|
702
|
|
|
703
|
+#define DXC_FULL_CONTROL_MODE 0
|
|
704
|
+#define DXC_AUTO_PARK_MODE 1
|
|
705
|
+#define DXC_DUPLICATION_MODE 2
|
|
706
|
+static int dual_x_carriage_mode = DEFAULT_DUAL_X_CARRIAGE_MODE;
|
|
707
|
+
|
696
|
708
|
static float x_home_pos(int extruder) {
|
697
|
709
|
if (extruder == 0)
|
698
|
710
|
return base_home_pos(X_AXIS) + add_homeing[X_AXIS];
|
|
@@ -708,16 +720,31 @@ static int x_home_dir(int extruder) {
|
708
|
720
|
return (extruder == 0) ? X_HOME_DIR : X2_HOME_DIR;
|
709
|
721
|
}
|
710
|
722
|
|
711
|
|
-static float inactive_x_carriage_pos = X2_MAX_POS;
|
712
|
|
-#endif
|
|
723
|
+static float inactive_extruder_x_pos = X2_MAX_POS; // used in mode 0 & 1
|
|
724
|
+static bool active_extruder_parked = false; // used in mode 1 & 2
|
|
725
|
+static float raised_parked_position[NUM_AXIS]; // used in mode 1
|
|
726
|
+static unsigned long delayed_move_time = 0; // used in mode 1
|
|
727
|
+static float duplicate_extruder_x_offset = DEFAULT_DUPLICATION_X_OFFSET; // used in mode 2
|
|
728
|
+static float duplicate_extruder_temp_offset = 0; // used in mode 2
|
|
729
|
+bool extruder_duplication_enabled = false; // used in mode 2
|
|
730
|
+#endif //DUAL_X_CARRIAGE
|
713
|
731
|
|
714
|
732
|
static void axis_is_at_home(int axis) {
|
715
|
733
|
#ifdef DUAL_X_CARRIAGE
|
716
|
|
- if (axis == X_AXIS && active_extruder != 0) {
|
717
|
|
- current_position[X_AXIS] = x_home_pos(active_extruder);
|
718
|
|
- min_pos[X_AXIS] = X2_MIN_POS;
|
719
|
|
- max_pos[X_AXIS] = max(extruder_offset[X_AXIS][1], X2_MAX_POS);
|
720
|
|
- return;
|
|
734
|
+ if (axis == X_AXIS) {
|
|
735
|
+ if (active_extruder != 0) {
|
|
736
|
+ current_position[X_AXIS] = x_home_pos(active_extruder);
|
|
737
|
+ min_pos[X_AXIS] = X2_MIN_POS;
|
|
738
|
+ max_pos[X_AXIS] = max(extruder_offset[X_AXIS][1], X2_MAX_POS);
|
|
739
|
+ return;
|
|
740
|
+ }
|
|
741
|
+ else if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && active_extruder == 0) {
|
|
742
|
+ current_position[X_AXIS] = base_home_pos(X_AXIS) + add_homeing[X_AXIS];
|
|
743
|
+ min_pos[X_AXIS] = base_min_pos(X_AXIS) + add_homeing[X_AXIS];
|
|
744
|
+ max_pos[X_AXIS] = min(base_max_pos(X_AXIS) + add_homeing[X_AXIS],
|
|
745
|
+ max(extruder_offset[X_AXIS][1], X2_MAX_POS) - duplicate_extruder_x_offset);
|
|
746
|
+ return;
|
|
747
|
+ }
|
721
|
748
|
}
|
722
|
749
|
#endif
|
723
|
750
|
current_position[axis] = base_home_pos(axis) + add_homeing[axis];
|
|
@@ -869,7 +896,7 @@ void process_commands()
|
869
|
896
|
for(int8_t i=0; i < NUM_AXIS; i++) {
|
870
|
897
|
destination[i] = current_position[i];
|
871
|
898
|
}
|
872
|
|
- feedrate = 0.0;
|
|
899
|
+ feedrate = 0.0;
|
873
|
900
|
|
874
|
901
|
#ifdef DELTA
|
875
|
902
|
// A delta can only safely home all axis at the same time
|
|
@@ -920,6 +947,7 @@ void process_commands()
|
920
|
947
|
int x_axis_home_dir = home_dir(X_AXIS);
|
921
|
948
|
#else
|
922
|
949
|
int x_axis_home_dir = x_home_dir(active_extruder);
|
|
950
|
+ extruder_duplication_enabled = false;
|
923
|
951
|
#endif
|
924
|
952
|
|
925
|
953
|
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
|
|
@@ -950,12 +978,19 @@ void process_commands()
|
950
|
978
|
{
|
951
|
979
|
#ifdef DUAL_X_CARRIAGE
|
952
|
980
|
int tmp_extruder = active_extruder;
|
|
981
|
+ extruder_duplication_enabled = false;
|
953
|
982
|
active_extruder = !active_extruder;
|
954
|
983
|
HOMEAXIS(X);
|
955
|
|
- inactive_x_carriage_pos = current_position[X_AXIS];
|
|
984
|
+ inactive_extruder_x_pos = current_position[X_AXIS];
|
956
|
985
|
active_extruder = tmp_extruder;
|
957
|
|
- #endif
|
958
|
986
|
HOMEAXIS(X);
|
|
987
|
+ // reset state used by the different modes
|
|
988
|
+ memcpy(raised_parked_position, current_position, sizeof(raised_parked_position));
|
|
989
|
+ delayed_move_time = 0;
|
|
990
|
+ active_extruder_parked = true;
|
|
991
|
+ #else
|
|
992
|
+ HOMEAXIS(X);
|
|
993
|
+ #endif
|
959
|
994
|
}
|
960
|
995
|
|
961
|
996
|
if((home_all_axis) || (code_seen(axis_codes[Y_AXIS]))) {
|
|
@@ -1199,6 +1234,10 @@ void process_commands()
|
1199
|
1234
|
break;
|
1200
|
1235
|
}
|
1201
|
1236
|
if (code_seen('S')) setTargetHotend(code_value(), tmp_extruder);
|
|
1237
|
+#ifdef DUAL_X_CARRIAGE
|
|
1238
|
+ if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && tmp_extruder == 0)
|
|
1239
|
+ setTargetHotend1(code_value() == 0.0 ? 0.0 : code_value() + duplicate_extruder_temp_offset);
|
|
1240
|
+#endif
|
1202
|
1241
|
setWatch();
|
1203
|
1242
|
break;
|
1204
|
1243
|
case 140: // M140 set bed temp
|
|
@@ -1252,9 +1291,17 @@ void process_commands()
|
1252
|
1291
|
#endif
|
1253
|
1292
|
if (code_seen('S')) {
|
1254
|
1293
|
setTargetHotend(code_value(), tmp_extruder);
|
|
1294
|
+#ifdef DUAL_X_CARRIAGE
|
|
1295
|
+ if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && tmp_extruder == 0)
|
|
1296
|
+ setTargetHotend1(code_value() == 0.0 ? 0.0 : code_value() + duplicate_extruder_temp_offset);
|
|
1297
|
+#endif
|
1255
|
1298
|
CooldownNoWait = true;
|
1256
|
1299
|
} else if (code_seen('R')) {
|
1257
|
1300
|
setTargetHotend(code_value(), tmp_extruder);
|
|
1301
|
+#ifdef DUAL_X_CARRIAGE
|
|
1302
|
+ if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && tmp_extruder == 0)
|
|
1303
|
+ setTargetHotend1(code_value() == 0.0 ? 0.0 : code_value() + duplicate_extruder_temp_offset);
|
|
1304
|
+#endif
|
1258
|
1305
|
CooldownNoWait = false;
|
1259
|
1306
|
}
|
1260
|
1307
|
#ifdef AUTOTEMP
|
|
@@ -1671,6 +1718,12 @@ void process_commands()
|
1671
|
1718
|
{
|
1672
|
1719
|
extruder_offset[Y_AXIS][tmp_extruder] = code_value();
|
1673
|
1720
|
}
|
|
1721
|
+ #ifdef DUAL_X_CARRIAGE
|
|
1722
|
+ if(code_seen('Z'))
|
|
1723
|
+ {
|
|
1724
|
+ extruder_offset[Z_AXIS][tmp_extruder] = code_value();
|
|
1725
|
+ }
|
|
1726
|
+ #endif
|
1674
|
1727
|
SERIAL_ECHO_START;
|
1675
|
1728
|
SERIAL_ECHOPGM(MSG_HOTEND_OFFSET);
|
1676
|
1729
|
for(tmp_extruder = 0; tmp_extruder < EXTRUDERS; tmp_extruder++)
|
|
@@ -1679,6 +1732,10 @@ void process_commands()
|
1679
|
1732
|
SERIAL_ECHO(extruder_offset[X_AXIS][tmp_extruder]);
|
1680
|
1733
|
SERIAL_ECHO(",");
|
1681
|
1734
|
SERIAL_ECHO(extruder_offset[Y_AXIS][tmp_extruder]);
|
|
1735
|
+ #ifdef DUAL_X_CARRIAGE
|
|
1736
|
+ SERIAL_ECHO(",");
|
|
1737
|
+ SERIAL_ECHO(extruder_offset[Z_AXIS][tmp_extruder]);
|
|
1738
|
+ #endif
|
1682
|
1739
|
}
|
1683
|
1740
|
SERIAL_ECHOLN("");
|
1684
|
1741
|
}break;
|
|
@@ -2013,6 +2070,53 @@ void process_commands()
|
2013
|
2070
|
}
|
2014
|
2071
|
break;
|
2015
|
2072
|
#endif //FILAMENTCHANGEENABLE
|
|
2073
|
+ #ifdef DUAL_X_CARRIAGE
|
|
2074
|
+ case 605: // Set dual x-carriage movement mode:
|
|
2075
|
+ // M605 S0: Full control mode. The slicer has full control over x-carriage movement
|
|
2076
|
+ // M605 S1: Auto-park mode. The inactive head will auto park/unpark without slicer involvement
|
|
2077
|
+ // M605 S2 [Xnnn] [Rmmm]: Duplication mode. The second extruder will duplicate the first with nnn
|
|
2078
|
+ // millimeters x-offset and an optional differential hotend temperature of
|
|
2079
|
+ // mmm degrees. E.g., with "M605 S2 X100 R2" the second extruder will duplicate
|
|
2080
|
+ // the first with a spacing of 100mm in the x direction and 2 degrees hotter.
|
|
2081
|
+ //
|
|
2082
|
+ // Note: the X axis should be homed after changing dual x-carriage mode.
|
|
2083
|
+ {
|
|
2084
|
+ st_synchronize();
|
|
2085
|
+
|
|
2086
|
+ if (code_seen('S'))
|
|
2087
|
+ dual_x_carriage_mode = code_value();
|
|
2088
|
+
|
|
2089
|
+ if (dual_x_carriage_mode == DXC_DUPLICATION_MODE)
|
|
2090
|
+ {
|
|
2091
|
+ if (code_seen('X'))
|
|
2092
|
+ duplicate_extruder_x_offset = max(code_value(),X2_MIN_POS - x_home_pos(0));
|
|
2093
|
+
|
|
2094
|
+ if (code_seen('R'))
|
|
2095
|
+ duplicate_extruder_temp_offset = code_value();
|
|
2096
|
+
|
|
2097
|
+ SERIAL_ECHO_START;
|
|
2098
|
+ SERIAL_ECHOPGM(MSG_HOTEND_OFFSET);
|
|
2099
|
+ SERIAL_ECHO(" ");
|
|
2100
|
+ SERIAL_ECHO(extruder_offset[X_AXIS][0]);
|
|
2101
|
+ SERIAL_ECHO(",");
|
|
2102
|
+ SERIAL_ECHO(extruder_offset[Y_AXIS][0]);
|
|
2103
|
+ SERIAL_ECHO(" ");
|
|
2104
|
+ SERIAL_ECHO(duplicate_extruder_x_offset);
|
|
2105
|
+ SERIAL_ECHO(",");
|
|
2106
|
+ SERIAL_ECHOLN(extruder_offset[Y_AXIS][1]);
|
|
2107
|
+ }
|
|
2108
|
+ else if (dual_x_carriage_mode != DXC_FULL_CONTROL_MODE && dual_x_carriage_mode != DXC_AUTO_PARK_MODE)
|
|
2109
|
+ {
|
|
2110
|
+ dual_x_carriage_mode = DEFAULT_DUAL_X_CARRIAGE_MODE;
|
|
2111
|
+ }
|
|
2112
|
+
|
|
2113
|
+ active_extruder_parked = false;
|
|
2114
|
+ extruder_duplication_enabled = false;
|
|
2115
|
+ delayed_move_time = 0;
|
|
2116
|
+ }
|
|
2117
|
+ break;
|
|
2118
|
+ #endif //DUAL_X_CARRIAGE
|
|
2119
|
+
|
2016
|
2120
|
case 907: // M907 Set digital trimpot motor current using axis codes.
|
2017
|
2121
|
{
|
2018
|
2122
|
#if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1
|
|
@@ -2092,19 +2196,56 @@ void process_commands()
|
2092
|
2196
|
// Save current position to return to after applying extruder offset
|
2093
|
2197
|
memcpy(destination, current_position, sizeof(destination));
|
2094
|
2198
|
#ifdef DUAL_X_CARRIAGE
|
2095
|
|
- // only apply Y extruder offset in dual x carriage mode (x offset is already used in determining home pos)
|
|
2199
|
+ if (dual_x_carriage_mode == DXC_AUTO_PARK_MODE && Stopped == false &&
|
|
2200
|
+ (delayed_move_time != 0 || current_position[X_AXIS] != x_home_pos(active_extruder)))
|
|
2201
|
+ {
|
|
2202
|
+ // Park old head: 1) raise 2) move to park position 3) lower
|
|
2203
|
+ plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS] + TOOLCHANGE_PARK_ZLIFT,
|
|
2204
|
+ current_position[E_AXIS], max_feedrate[Z_AXIS], active_extruder);
|
|
2205
|
+ plan_buffer_line(x_home_pos(active_extruder), current_position[Y_AXIS], current_position[Z_AXIS] + TOOLCHANGE_PARK_ZLIFT,
|
|
2206
|
+ current_position[E_AXIS], max_feedrate[X_AXIS], active_extruder);
|
|
2207
|
+ plan_buffer_line(x_home_pos(active_extruder), current_position[Y_AXIS], current_position[Z_AXIS],
|
|
2208
|
+ current_position[E_AXIS], max_feedrate[Z_AXIS], active_extruder);
|
|
2209
|
+ st_synchronize();
|
|
2210
|
+ }
|
|
2211
|
+
|
|
2212
|
+ // apply Y & Z extruder offset (x offset is already used in determining home pos)
|
2096
|
2213
|
current_position[Y_AXIS] = current_position[Y_AXIS] -
|
2097
|
2214
|
extruder_offset[Y_AXIS][active_extruder] +
|
2098
|
2215
|
extruder_offset[Y_AXIS][tmp_extruder];
|
|
2216
|
+ current_position[Z_AXIS] = current_position[Z_AXIS] -
|
|
2217
|
+ extruder_offset[Z_AXIS][active_extruder] +
|
|
2218
|
+ extruder_offset[Z_AXIS][tmp_extruder];
|
|
2219
|
+
|
|
2220
|
+ active_extruder = tmp_extruder;
|
2099
|
2221
|
|
2100
|
|
- float tmp_x_pos = current_position[X_AXIS];
|
|
2222
|
+ // This function resets the max/min values - the current position may be overwritten below.
|
|
2223
|
+ axis_is_at_home(X_AXIS);
|
2101
|
2224
|
|
2102
|
|
- // Set the new active extruder and position
|
2103
|
|
- active_extruder = tmp_extruder;
|
2104
|
|
- axis_is_at_home(X_AXIS); //this function updates X min/max values.
|
2105
|
|
- current_position[X_AXIS] = inactive_x_carriage_pos;
|
2106
|
|
- inactive_x_carriage_pos = tmp_x_pos;
|
2107
|
|
- #else
|
|
2225
|
+ if (dual_x_carriage_mode == DXC_FULL_CONTROL_MODE)
|
|
2226
|
+ {
|
|
2227
|
+ current_position[X_AXIS] = inactive_extruder_x_pos;
|
|
2228
|
+ inactive_extruder_x_pos = destination[X_AXIS];
|
|
2229
|
+ }
|
|
2230
|
+ else if (dual_x_carriage_mode == DXC_DUPLICATION_MODE)
|
|
2231
|
+ {
|
|
2232
|
+ active_extruder_parked = (active_extruder == 0); // this triggers the second extruder to move into the duplication position
|
|
2233
|
+ if (active_extruder == 0 || active_extruder_parked)
|
|
2234
|
+ current_position[X_AXIS] = inactive_extruder_x_pos;
|
|
2235
|
+ else
|
|
2236
|
+ current_position[X_AXIS] = destination[X_AXIS] + duplicate_extruder_x_offset;
|
|
2237
|
+ inactive_extruder_x_pos = destination[X_AXIS];
|
|
2238
|
+ extruder_duplication_enabled = false;
|
|
2239
|
+ }
|
|
2240
|
+ else
|
|
2241
|
+ {
|
|
2242
|
+ // record raised toolhead position for use by unpark
|
|
2243
|
+ memcpy(raised_parked_position, current_position, sizeof(raised_parked_position));
|
|
2244
|
+ raised_parked_position[Z_AXIS] += TOOLCHANGE_UNPARK_ZLIFT;
|
|
2245
|
+ active_extruder_parked = true;
|
|
2246
|
+ delayed_move_time = 0;
|
|
2247
|
+ }
|
|
2248
|
+ #else
|
2108
|
2249
|
// Offset extruder (only by XY)
|
2109
|
2250
|
int i;
|
2110
|
2251
|
for(i = 0; i < 2; i++) {
|
|
@@ -2309,6 +2450,48 @@ void prepare_move()
|
2309
|
2450
|
active_extruder);
|
2310
|
2451
|
}
|
2311
|
2452
|
#else
|
|
2453
|
+
|
|
2454
|
+#ifdef DUAL_X_CARRIAGE
|
|
2455
|
+ if (active_extruder_parked)
|
|
2456
|
+ {
|
|
2457
|
+ if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && active_extruder == 0)
|
|
2458
|
+ {
|
|
2459
|
+ // move duplicate extruder into correct duplication position.
|
|
2460
|
+ plan_set_position(inactive_extruder_x_pos, current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
|
|
2461
|
+ plan_buffer_line(current_position[X_AXIS] + duplicate_extruder_x_offset, current_position[Y_AXIS], current_position[Z_AXIS],
|
|
2462
|
+ current_position[E_AXIS], max_feedrate[X_AXIS], 1);
|
|
2463
|
+ plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
|
|
2464
|
+ st_synchronize();
|
|
2465
|
+ extruder_duplication_enabled = true;
|
|
2466
|
+ active_extruder_parked = false;
|
|
2467
|
+ }
|
|
2468
|
+ else if (dual_x_carriage_mode == DXC_AUTO_PARK_MODE) // handle unparking of head
|
|
2469
|
+ {
|
|
2470
|
+ if (current_position[E_AXIS] == destination[E_AXIS])
|
|
2471
|
+ {
|
|
2472
|
+ // this is a travel move - skit it but keep track of current position (so that it can later
|
|
2473
|
+ // be used as start of first non-travel move)
|
|
2474
|
+ if (delayed_move_time != 0xFFFFFFFFUL)
|
|
2475
|
+ {
|
|
2476
|
+ memcpy(current_position, destination, sizeof(current_position));
|
|
2477
|
+ if (destination[Z_AXIS] > raised_parked_position[Z_AXIS])
|
|
2478
|
+ raised_parked_position[Z_AXIS] = destination[Z_AXIS];
|
|
2479
|
+ delayed_move_time = millis();
|
|
2480
|
+ return;
|
|
2481
|
+ }
|
|
2482
|
+ }
|
|
2483
|
+ delayed_move_time = 0;
|
|
2484
|
+ // unpark extruder: 1) raise, 2) move into starting XY position, 3) lower
|
|
2485
|
+ plan_buffer_line(raised_parked_position[X_AXIS], raised_parked_position[Y_AXIS], raised_parked_position[Z_AXIS], current_position[E_AXIS], max_feedrate[Z_AXIS], active_extruder);
|
|
2486
|
+ plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], raised_parked_position[Z_AXIS],
|
|
2487
|
+ current_position[E_AXIS], min(max_feedrate[X_AXIS],max_feedrate[Y_AXIS]), active_extruder);
|
|
2488
|
+ plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS],
|
|
2489
|
+ current_position[E_AXIS], max_feedrate[Z_AXIS], active_extruder);
|
|
2490
|
+ active_extruder_parked = false;
|
|
2491
|
+ }
|
|
2492
|
+ }
|
|
2493
|
+#endif //DUAL_X_CARRIAGE
|
|
2494
|
+
|
2312
|
2495
|
// Do not use feedmultiply for E or Z only moves
|
2313
|
2496
|
if( (current_position[X_AXIS] == destination [X_AXIS]) && (current_position[Y_AXIS] == destination [Y_AXIS])) {
|
2314
|
2497
|
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder);
|
|
@@ -2316,7 +2499,7 @@ void prepare_move()
|
2316
|
2499
|
else {
|
2317
|
2500
|
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate*feedmultiply/60/100.0, active_extruder);
|
2318
|
2501
|
}
|
2319
|
|
-#endif
|
|
2502
|
+#endif //else DELTA
|
2320
|
2503
|
for(int8_t i=0; i < NUM_AXIS; i++) {
|
2321
|
2504
|
current_position[i] = destination[i];
|
2322
|
2505
|
}
|
|
@@ -2428,6 +2611,16 @@ void manage_inactivity()
|
2428
|
2611
|
WRITE(E0_ENABLE_PIN,oldstatus);
|
2429
|
2612
|
}
|
2430
|
2613
|
#endif
|
|
2614
|
+ #if defined(DUAL_X_CARRIAGE)
|
|
2615
|
+ // handle delayed move timeout
|
|
2616
|
+ if (delayed_move_time != 0 && (millis() - delayed_move_time) > 1000 && Stopped == false)
|
|
2617
|
+ {
|
|
2618
|
+ // travel moves have been received so enact them
|
|
2619
|
+ delayed_move_time = 0xFFFFFFFFUL; // force moves to be done
|
|
2620
|
+ memcpy(destination,current_position,sizeof(destination));
|
|
2621
|
+ prepare_move();
|
|
2622
|
+ }
|
|
2623
|
+ #endif
|
2431
|
2624
|
check_axes_activity();
|
2432
|
2625
|
}
|
2433
|
2626
|
|