From 05a64e20137ef1d03ff24ab02ae59d1cfc26b4cb Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 20 Oct 2025 15:03:31 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=B8=20Fix=20'M493=20G',=20collisions?= =?UTF-8?q?=20'E'=20'O'=20(and=20'M'),=20'W'=20report?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Part of #21827 --- Marlin/src/gcode/feature/ft_motion/M493.cpp | 72 +++++++++++++++++---- 1 file changed, 59 insertions(+), 13 deletions(-) diff --git a/Marlin/src/gcode/feature/ft_motion/M493.cpp b/Marlin/src/gcode/feature/ft_motion/M493.cpp index f1dc4d0753..c9b056d7d1 100644 --- a/Marlin/src/gcode/feature/ft_motion/M493.cpp +++ b/Marlin/src/gcode/feature/ft_motion/M493.cpp @@ -128,6 +128,22 @@ void GcodeSuite::M493_report(const bool forReplay/*=true*/) { const ft_config_t &c = ftMotion.cfg; SERIAL_ECHOLNPGM( " M493 S", c.active + + // Shaper type for each axis + #if HAS_X_AXIS + , " X", c.shaper.x + #endif + #if HAS_Y_AXIS + , " Y", c.shaper.y + #endif + #if ENABLED(FTM_SHAPER_Z) + , " Z", c.shaper.z + #endif + #if ENABLED(FTM_SHAPER_E) + , " E", c.shaper.e + #endif + + // Base Frequency for axis shapers #if HAS_X_AXIS , " A", c.baseFreq.x #endif @@ -138,9 +154,10 @@ void GcodeSuite::M493_report(const bool forReplay/*=true*/) { , " C", c.baseFreq.z #endif #if ENABLED(FTM_SHAPER_E) - , " E", c.baseFreq.e + , " W", c.baseFreq.e #endif + // Dynamic Frequency Mode and Axis K Factors #if HAS_DYNAMIC_FREQ , " D", c.dynFreqMode #if HAS_X_AXIS @@ -153,10 +170,39 @@ void GcodeSuite::M493_report(const bool forReplay/*=true*/) { , " L", c.dynFreqK.z #endif #if ENABLED(FTM_SHAPER_E) - , " O", c.dynFreqK.e + , " N", c.dynFreqK.e #endif #endif + // Zeta Value + #if HAS_X_AXIS + , " I", c.zeta.x + #endif + #if HAS_Y_AXIS + , " J", c.zeta.y + #endif + #if ENABLED(FTM_SHAPER_Z) + , " O", c.zeta.z + #endif + #if ENABLED(FTM_SHAPER_E) + , " U", c.zeta.e + #endif + + // Vibration Tolerance + #if HAS_X_AXIS + , " Q", c.vtol.x + #endif + #if HAS_Y_AXIS + , " R", c.vtol.y + #endif + #if ENABLED(FTM_SHAPER_Z) + , " T", c.vtol.z + #endif + #if ENABLED(FTM_SHAPER_E) + , " V", c.vtol.e + #endif + + // Axis Synchronization , " G", c.axis_sync_enabled #if HAS_EXTRUDERS @@ -199,22 +245,22 @@ void GcodeSuite::M493_report(const bool forReplay/*=true*/) { * A Set X static/base frequency * F Set X frequency scaling * I Set X damping ratio - * Q Set X vibration tolerance + * Q Set X vibration tolerance (vtol) * * B Set Y static/base frequency * H Set Y frequency scaling * J Set Y damping ratio * R Set Y vibration tolerance * - * With FTM_SHAPING_Z: + * With FTM_SHAPER_Z: * C Set Z static/base frequency * L Set Z frequency scaling * O Set Z damping ratio - * M Set Z vibration tolerance + * T Set Z vibration tolerance * - * With FTM_SHAPING_E: + * With FTM_SHAPER_E: * W Set E static/base frequency - * O Set E frequency scaling + * N Set E frequency scaling * U Set E damping ratio * V Set E vibration tolerance * @@ -286,8 +332,8 @@ void GcodeSuite::M493() { #endif // HAS_EXTRUDERS - // Parse '?' axis synchronization parameter. - if (parser.seen('?')) { + // Parse 'G' axis synchronization parameter. + if (parser.seenval('G')) { const bool enabled = parser.value_bool(); if (enabled != ftMotion.cfg.axis_sync_enabled) { ftMotion.cfg.axis_sync_enabled = enabled; @@ -497,7 +543,7 @@ void GcodeSuite::M493() { } // Parse Z vtol parameter - if (parser.seenval('M')) { + if (parser.seenval('T')) { const float val = parser.value_float(); if (AXIS_IS_EISHAPING(Z)) { if (WITHIN(val, 0.00f, 1.0f)) { @@ -505,7 +551,7 @@ void GcodeSuite::M493() { flag.update = true; } else - SERIAL_ECHOLNPGM("?Invalid ", C(STEPPER_C_NAME), " vtol [", C('M'), "] value."); // VTol out of range. + SERIAL_ECHOLNPGM("?Invalid ", C(STEPPER_C_NAME), " vtol [", C('T'), "] value."); // VTol out of range. } else SERIAL_ECHOLNPGM("?Wrong mode for ", C(STEPPER_C_NAME), " vtol parameter."); @@ -532,13 +578,13 @@ void GcodeSuite::M493() { #if HAS_DYNAMIC_FREQ // Parse E frequency scaling parameter - if (parser.seenval('O')) { + if (parser.seenval('N')) { if (modeUsesDynFreq) { ftMotion.cfg.dynFreqK.e = parser.value_float(); flag.report = true; } else - SERIAL_ECHOLNPGM("?Wrong mode for ", C('E'), " [", C('O'), "] frequency scaling."); + SERIAL_ECHOLNPGM("?Wrong mode for ", C('E'), " [", C('N'), "] frequency scaling."); } #endif