@@ -221,9 +221,9 @@ void GcodeSuite::M203_report(const bool forReplay/*=true*/) {
221
221
/* *
222
222
* M204: Set Accelerations in units/sec^2 (M204 P1200 R3000 T3000)
223
223
*
224
- * P = Printing moves
225
- * R = Retract only (no X, Y, Z) moves
226
- * T = Travel (non printing) moves
224
+ * P<accel> Printing moves
225
+ * R<accel> Retract only (no X, Y, Z) moves
226
+ * T<accel> Travel (non printing) moves
227
227
*/
228
228
void GcodeSuite::M204 () {
229
229
if (!parser.seen (" PRST" ))
@@ -247,24 +247,37 @@ void GcodeSuite::M204_report(const bool forReplay/*=true*/) {
247
247
);
248
248
}
249
249
250
+ #if AXIS_COLLISION('B')
251
+ #define M205_MIN_SEG_TIME_PARAM ' D'
252
+ #define M205_MIN_SEG_TIME_STR " D"
253
+ #warning "Use 'M205 D' for Minimum Segment Time."
254
+ #else
255
+ #define M205_MIN_SEG_TIME_PARAM ' B'
256
+ #define M205_MIN_SEG_TIME_STR " B"
257
+ #endif
258
+
250
259
/* *
251
260
* M205: Set Advanced Settings
252
261
*
253
- * B = Min Segment Time (µs)
254
- * S = Min Feed Rate (units/s)
255
- * T = Min Travel Feed Rate (units/s)
256
- * X = Max X Jerk (units/sec^2)
257
- * Y = Max Y Jerk (units/sec^2)
258
- * Z = Max Z Jerk (units/sec^2)
259
- * E = Max E Jerk (units/sec^2)
260
- * J = Junction Deviation (mm) (If not using CLASSIC_JERK)
262
+ * B<µs> : Min Segment Time
263
+ * S<units/s> : Min Feed Rate
264
+ * T<units/s> : Min Travel Feed Rate
265
+ *
266
+ * With CLASSIC_JERK:
267
+ * X<units/sec^2> : Max X Jerk
268
+ * Y<units/sec^2> : Max Y Jerk
269
+ * Z<units/sec^2> : Max Z Jerk
270
+ * ... : etc
271
+ * E<units/sec^2> : Max E Jerk
272
+ *
273
+ * Without CLASSIC_JERK:
274
+ * J(mm) : Junction Deviation
261
275
*/
262
276
void GcodeSuite::M205 () {
263
- if (!parser.seen (" BST" TERN_ (HAS_JUNCTION_DEVIATION, " J" ) TERN_ (HAS_CLASSIC_JERK, " XYZE" )))
264
- return M205_report ();
277
+ if (!parser.seen_any ()) return M205_report ();
265
278
266
279
// planner.synchronize();
267
- if (parser.seenval (' B ' )) planner.settings .min_segment_time_us = parser.value_ulong ();
280
+ if (parser.seenval (M205_MIN_SEG_TIME_PARAM )) planner.settings .min_segment_time_us = parser.value_ulong ();
268
281
if (parser.seenval (' S' )) planner.settings .min_feedrate_mm_s = parser.value_linear_units ();
269
282
if (parser.seenval (' T' )) planner.settings .min_travel_feedrate_mm_s = parser.value_linear_units ();
270
283
#if HAS_JUNCTION_DEVIATION
@@ -304,7 +317,7 @@ void GcodeSuite::M205() {
304
317
305
318
void GcodeSuite::M205_report (const bool forReplay/* =true*/ ) {
306
319
report_heading_etc (forReplay, F (
307
- " Advanced (B <min_segment_time_us> S<min_feedrate> T<min_travel_feedrate>"
320
+ " Advanced (" M205_MIN_SEG_TIME_STR " <min_segment_time_us> S<min_feedrate> T<min_travel_feedrate>"
308
321
TERN_ (HAS_JUNCTION_DEVIATION, " J<junc_dev>" )
309
322
#if HAS_CLASSIC_JERK
310
323
NUM_AXIS_GANG (
@@ -317,7 +330,7 @@ void GcodeSuite::M205_report(const bool forReplay/*=true*/) {
317
330
" )"
318
331
));
319
332
SERIAL_ECHOLNPGM_P (
320
- PSTR (" M205 B " ), LINEAR_UNIT (planner.settings .min_segment_time_us )
333
+ PSTR (" M205 " M205_MIN_SEG_TIME_STR ), LINEAR_UNIT (planner.settings .min_segment_time_us )
321
334
, PSTR (" S" ), LINEAR_UNIT (planner.settings .min_feedrate_mm_s )
322
335
, SP_T_STR, LINEAR_UNIT (planner.settings .min_travel_feedrate_mm_s )
323
336
#if HAS_JUNCTION_DEVIATION
0 commit comments