🚸 Change M201 G to S

This commit is contained in:
Scott Lahteine 2022-05-28 17:05:09 -05:00
parent a59766195c
commit 41a469208a

View file

@ -108,12 +108,21 @@
#endif // !NO_VOLUMETRICS
/**
* M201: Set max acceleration in units/s^2 for print moves (M201 X1000 Y1000)
* M201: Set max acceleration in units/s^2 for print moves.
*
* With multiple extruders use T to specify which one.
* X<accel> : Max Acceleration for X
* Y<accel> : Max Acceleration for Y
* Z<accel> : Max Acceleration for Z
* ... : etc
* E<accel> : Max Acceleration for Extruder
* T<index> : Extruder index to set
*
* With XY_FREQUENCY_LIMIT:
* F<Hz> : Frequency limit for XY...IJKUVW
* S<percent> : Speed factor percentage.
*/
void GcodeSuite::M201() {
if (!parser.seen("T" STR_AXES_LOGICAL))
if (!parser.seen("T" STR_AXES_LOGICAL TERN_(XY_FREQUENCY_LIMIT, "FS")))
return M201_report();
const int8_t target_extruder = get_target_extruder_from_command();
@ -121,7 +130,7 @@ void GcodeSuite::M201() {
#ifdef XY_FREQUENCY_LIMIT
if (parser.seenval('F')) planner.set_frequency_limit(parser.value_byte());
if (parser.seenval('G')) planner.xy_freq_min_speed_factor = constrain(parser.value_float(), 1, 100) / 100;
if (parser.seenval('S')) planner.xy_freq_min_speed_factor = constrain(parser.value_float(), 1, 100) / 100;
#endif
LOOP_LOGICAL_AXES(i) {