|
@@ -32,6 +32,7 @@ void M217_report(const bool eeprom=false) {
|
32
|
32
|
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
|
33
|
33
|
serialprintPGM(eeprom ? PSTR(" M217") : PSTR("Toolchange:"));
|
34
|
34
|
SERIAL_ECHOPAIR(" S", LINEAR_UNIT(toolchange_settings.swap_length));
|
|
35
|
+ SERIAL_ECHOPAIR(" E", LINEAR_UNIT(toolchange_settings.extra_prime));
|
35
|
36
|
SERIAL_ECHOPAIR(" P", LINEAR_UNIT(toolchange_settings.prime_speed));
|
36
|
37
|
SERIAL_ECHOPAIR(" R", LINEAR_UNIT(toolchange_settings.retract_speed));
|
37
|
38
|
|
|
@@ -54,6 +55,7 @@ void M217_report(const bool eeprom=false) {
|
54
|
55
|
* M217 - Set SINGLENOZZLE toolchange parameters
|
55
|
56
|
*
|
56
|
57
|
* S[linear] Swap length
|
|
58
|
+ * E[linear] Purge length
|
57
|
59
|
* P[linear/m] Prime speed
|
58
|
60
|
* R[linear/m] Retract speed
|
59
|
61
|
* X[linear] Park X (Requires TOOLCHANGE_PARK)
|
|
@@ -68,18 +70,29 @@ void GcodeSuite::M217() {
|
68
|
70
|
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
|
69
|
71
|
|
70
|
72
|
#undef SPR_PARAM
|
71
|
|
- #define SPR_PARAM "SPR"
|
72
|
|
-
|
73
|
|
- if (parser.seenval('S')) { const float v = parser.value_linear_units(); toolchange_settings.swap_length = constrain(v, 0, 500); }
|
|
73
|
+ #define SPR_PARAM "SPRE"
|
|
74
|
+
|
|
75
|
+ static constexpr float max_extrude =
|
|
76
|
+ #if ENABLED(PREVENT_LENGTHY_EXTRUDE)
|
|
77
|
+ EXTRUDE_MAXLENGTH
|
|
78
|
+ #else
|
|
79
|
+ 500
|
|
80
|
+ #endif
|
|
81
|
+ ;
|
|
82
|
+
|
|
83
|
+ if (parser.seenval('S')) { const float v = parser.value_linear_units(); toolchange_settings.swap_length = constrain(v, 0, max_extrude); }
|
|
84
|
+ if (parser.seenval('E')) { const float v = parser.value_linear_units(); toolchange_settings.extra_prime = constrain(v, 0, max_extrude); }
|
74
|
85
|
if (parser.seenval('P')) { const int16_t v = parser.value_linear_units(); toolchange_settings.prime_speed = constrain(v, 10, 5400); }
|
75
|
86
|
if (parser.seenval('R')) { const int16_t v = parser.value_linear_units(); toolchange_settings.retract_speed = constrain(v, 10, 5400); }
|
76
|
87
|
#endif
|
|
88
|
+
|
77
|
89
|
#if ENABLED(TOOLCHANGE_PARK)
|
78
|
90
|
#undef XY_PARAM
|
79
|
91
|
#define XY_PARAM "XY"
|
80
|
92
|
if (parser.seenval('X')) { toolchange_settings.change_point.x = parser.value_linear_units(); }
|
81
|
93
|
if (parser.seenval('Y')) { toolchange_settings.change_point.y = parser.value_linear_units(); }
|
82
|
94
|
#endif
|
|
95
|
+
|
83
|
96
|
if (parser.seenval('Z')) { toolchange_settings.z_raise = parser.value_linear_units(); }
|
84
|
97
|
|
85
|
98
|
if (!parser.seen(SPR_PARAM XY_PARAM "Z")) M217_report();
|