🐛 Fix FT Motion M496 processing, etc. (#28261)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
narno2202 2026-01-11 02:57:20 +01:00 committed by GitHub
parent 1e457650f3
commit a5a6732508
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 13 additions and 5 deletions

View file

@ -150,7 +150,7 @@ void EmergencyParser::update(EmergencyParser::State &state, const uint8_t c) {
case EP_M4:
switch (c) {
case '1' :state = EP_M41; break;
#if ENABLED(FT_MOTION_RESONANCE_TEST)
#if ENABLED(FTM_RESONANCE_TEST)
case '9': state = EP_M49; break;
#endif
default: state = EP_IGNORE;

View file

@ -25,6 +25,7 @@
#if ENABLED(FTM_RESONANCE_TEST)
#include "../../gcode.h"
#include "../../../lcd/marlinui.h"
#include "../../../module/ft_motion.h"
#include "../../../module/ft_motion/resonance_generator.h"
@ -173,6 +174,7 @@ void GcodeSuite::M496() {
if (ftMotion.rtg.isActive()) {
ftMotion.rtg.abort();
EmergencyParser::rt_stop_by_M496 = false;
ui.refresh();
#if DISABLED(MARLIN_SMALL_BUILD)
SERIAL_ECHOLN(F("Resonance Test"), F(" aborted."));
#endif

View file

@ -424,12 +424,18 @@ void menu_move() {
if (ftMotion.rtg.isActive() && !ftMotion.rtg.isDone()) {
STATIC_ITEM(MSG_FTM_RT_RUNNING);
ACTION_ITEM(MSG_FTM_RT_STOP, []{ ftMotion.rtg.abort(); ui.refresh(); });
GCODES_ITEM(MSG_FTM_RT_STOP, F("M496"));
}
else {
GCODES_ITEM_N(X_AXIS, MSG_FTM_RT_START_N, F("M495 X S"));
GCODES_ITEM_N(Y_AXIS, MSG_FTM_RT_START_N, F("M495 Y S"));
GCODES_ITEM_N(Z_AXIS, MSG_FTM_RT_START_N, F("M495 Z S"));
#if HAS_X_AXIS
GCODES_ITEM_N(X_AXIS, MSG_FTM_RT_START_N, F("M495 X S"));
#endif
#if HAS_Y_AXIS
GCODES_ITEM_N(Y_AXIS, MSG_FTM_RT_START_N, F("M495 Y S"));
#endif
#if HAS_Z_AXIS
GCODES_ITEM_N(Z_AXIS, MSG_FTM_RT_START_N, F("M495 Z S"));
#endif
SUBMENU(MSG_FTM_RETRIEVE_FREQ, menu_ftm_resonance_freq);
}