4343 * S[linear] Swap length
4444 * B[linear] Extra Swap resume length
4545 * E[linear] Extra Prime length (as used by M217 Q)
46- * P [linear/min] Prime speed
46+ * G [linear] Cutting wipe retract length (<=100mm)
4747 * R[linear/min] Retract speed
4848 * U[linear/min] UnRetract speed
49+ * P[linear/min] Prime speed
4950 * V[linear] 0/1 Enable auto prime first extruder used
5051 * W[linear] 0/1 Enable park & Z Raise
5152 * X[linear] Park X (Requires TOOLCHANGE_PARK)
52- * Y[linear] Park Y (Requires TOOLCHANGE_PARK)
53+ * Y[linear] Park Y (Requires TOOLCHANGE_PARK and NUM_AXES >= 2 )
5354 * I[linear] Park I (Requires TOOLCHANGE_PARK and NUM_AXES >= 4)
5455 * J[linear] Park J (Requires TOOLCHANGE_PARK and NUM_AXES >= 5)
5556 * K[linear] Park K (Requires TOOLCHANGE_PARK and NUM_AXES >= 6)
@@ -79,6 +80,7 @@ void GcodeSuite::M217() {
7980 if (parser.seenval (' B' )) { const float v = parser.value_linear_units (); toolchange_settings.extra_resume = constrain (v, -10 , 10 ); }
8081 if (parser.seenval (' E' )) { const float v = parser.value_linear_units (); toolchange_settings.extra_prime = constrain (v, 0 , max_extrude); }
8182 if (parser.seenval (' P' )) { const int16_t v = parser.value_linear_units (); toolchange_settings.prime_speed = constrain (v, 10 , 5400 ); }
83+ if (parser.seenval (' G' )) { const int16_t v = parser.value_linear_units (); toolchange_settings.wipe_retract = constrain (v, 0 , 100 ); }
8284 if (parser.seenval (' R' )) { const int16_t v = parser.value_linear_units (); toolchange_settings.retract_speed = constrain (v, 10 , 5400 ); }
8385 if (parser.seenval (' U' )) { const int16_t v = parser.value_linear_units (); toolchange_settings.unretract_speed = constrain (v, 10 , 5400 ); }
8486 #if TOOLCHANGE_FS_FAN >= 0 && HAS_FAN
@@ -164,21 +166,24 @@ void GcodeSuite::M217_report(const bool forReplay/*=true*/) {
164166 SERIAL_ECHOPGM (" M217" );
165167
166168 #if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
167- SERIAL_ECHOPGM (" S" , LINEAR_UNIT (toolchange_settings.swap_length ));
168- SERIAL_ECHOPGM_P (SP_B_STR, LINEAR_UNIT (toolchange_settings.extra_resume ),
169- SP_E_STR, LINEAR_UNIT (toolchange_settings.extra_prime ),
170- SP_P_STR, LINEAR_UNIT (toolchange_settings.prime_speed ));
171- SERIAL_ECHOPGM (" R" , LINEAR_UNIT (toolchange_settings.retract_speed ),
172- " U" , LINEAR_UNIT (toolchange_settings.unretract_speed ),
173- " F" , toolchange_settings.fan_speed ,
174- " D" , toolchange_settings.fan_time );
169+ SERIAL_ECHOPGM_P (
170+ PSTR (" S" ), LINEAR_UNIT (toolchange_settings.swap_length ),
171+ SP_B_STR, LINEAR_UNIT (toolchange_settings.extra_resume ),
172+ SP_E_STR, LINEAR_UNIT (toolchange_settings.extra_prime ),
173+ SP_P_STR, LINEAR_UNIT (toolchange_settings.prime_speed ),
174+ PSTR (" G" ), LINEAR_UNIT (toolchange_settings.wipe_retract ),
175+ PSTR (" R" ), LINEAR_UNIT (toolchange_settings.retract_speed ),
176+ PSTR (" U" ), LINEAR_UNIT (toolchange_settings.unretract_speed ),
177+ PSTR (" F" ), toolchange_settings.fan_speed ,
178+ PSTR (" D" ), toolchange_settings.fan_time
179+ );
175180
176181 #if ENABLED(TOOLCHANGE_MIGRATION_FEATURE)
177- SERIAL_ECHOPGM (" A" , migration.automode );
178- SERIAL_ECHOPGM (" L" , LINEAR_UNIT (migration.last ));
182+ SERIAL_ECHOPGM (" A" , migration.automode , " L" , LINEAR_UNIT (migration.last ));
179183 #endif
180184
181185 #if ENABLED(TOOLCHANGE_PARK)
186+ {
182187 SERIAL_ECHOPGM (" W" , LINEAR_UNIT (toolchange_settings.enable_park ));
183188 SERIAL_ECHOPGM_P (
184189 SP_X_STR, LINEAR_UNIT (toolchange_settings.change_point .x )
@@ -196,6 +201,7 @@ void GcodeSuite::M217_report(const bool forReplay/*=true*/) {
196201 )
197202 #endif
198203 );
204+ }
199205 #endif
200206
201207 #if ENABLED(TOOLCHANGE_FS_PRIME_FIRST_USED)
0 commit comments