mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-08-07 05:53:56 -06:00
🐛 Fix M201 with XY_FREQUENCY_LIMIT (#27859)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
parent
ebecd76492
commit
3572fd75b5
1 changed files with 23 additions and 6 deletions
|
@ -124,8 +124,13 @@
|
|||
* S<percent> : Speed factor percentage.
|
||||
*/
|
||||
void GcodeSuite::M201() {
|
||||
if (!parser.seen("T" STR_AXES_LOGICAL TERN_(XY_FREQUENCY_LIMIT, "FS")))
|
||||
if (!parser.seen("T" STR_AXES_LOGICAL
|
||||
#ifdef XY_FREQUENCY_LIMIT
|
||||
"FS"
|
||||
#endif
|
||||
)) {
|
||||
return M201_report();
|
||||
}
|
||||
|
||||
const int8_t target_extruder = get_target_extruder_from_command();
|
||||
if (target_extruder < 0) return;
|
||||
|
@ -147,7 +152,11 @@ void GcodeSuite::M201_report(const bool forReplay/*=true*/) {
|
|||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading_etc(forReplay, F(STR_MAX_ACCELERATION));
|
||||
|
||||
bool eol = false;
|
||||
|
||||
#if NUM_AXES
|
||||
eol = true;
|
||||
SERIAL_ECHOPGM_P(
|
||||
LIST_N(DOUBLE(NUM_AXES),
|
||||
PSTR(" M201 X"), LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[X_AXIS]),
|
||||
|
@ -164,13 +173,18 @@ void GcodeSuite::M201_report(const bool forReplay/*=true*/) {
|
|||
#endif
|
||||
|
||||
#if HAS_EXTRUDERS && DISABLED(DISTINCT_E_FACTORS)
|
||||
eol = true;
|
||||
SERIAL_ECHOPGM_P(SP_E_STR, VOLUMETRIC_UNIT(planner.settings.max_acceleration_mm_per_s2[E_AXIS]));
|
||||
#endif
|
||||
|
||||
#if NUM_AXES || (HAS_EXTRUDERS && DISABLED(DISTINCT_E_FACTORS))
|
||||
SERIAL_EOL();
|
||||
#ifdef XY_FREQUENCY_LIMIT
|
||||
eol = true;
|
||||
SERIAL_ECHOPGM_P(PSTR(" F"), planner.xy_freq_limit_hz);
|
||||
SERIAL_ECHOPGM_P(PSTR(" S"), (planner.xy_freq_min_speed_factor * 100));
|
||||
#endif
|
||||
|
||||
if (eol) SERIAL_EOL();
|
||||
|
||||
#if ENABLED(DISTINCT_E_FACTORS)
|
||||
for (uint8_t i = 0; i < E_STEPPERS; ++i) {
|
||||
report_echo_start(forReplay);
|
||||
|
@ -205,7 +219,11 @@ void GcodeSuite::M203_report(const bool forReplay/*=true*/) {
|
|||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading_etc(forReplay, F(STR_MAX_FEEDRATES));
|
||||
|
||||
bool eol = false;
|
||||
|
||||
#if NUM_AXES
|
||||
eol = true;
|
||||
SERIAL_ECHOPGM_P(
|
||||
LIST_N(DOUBLE(NUM_AXES),
|
||||
PSTR(" M203 X"), LINEAR_UNIT(planner.settings.max_feedrate_mm_s[X_AXIS]),
|
||||
|
@ -222,12 +240,11 @@ void GcodeSuite::M203_report(const bool forReplay/*=true*/) {
|
|||
#endif
|
||||
|
||||
#if HAS_EXTRUDERS && DISABLED(DISTINCT_E_FACTORS)
|
||||
eol = true;
|
||||
SERIAL_ECHOPGM_P(SP_E_STR, VOLUMETRIC_UNIT(planner.settings.max_feedrate_mm_s[E_AXIS]));
|
||||
#endif
|
||||
|
||||
#if NUM_AXES || (HAS_EXTRUDERS && DISABLED(DISTINCT_E_FACTORS))
|
||||
SERIAL_EOL();
|
||||
#endif
|
||||
if (eol) SERIAL_EOL();
|
||||
|
||||
#if ENABLED(DISTINCT_E_FACTORS)
|
||||
for (uint8_t i = 0; i < E_STEPPERS; ++i) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue