mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2026-01-18 05:45:33 -07:00
🐛 Fix FT Motion M496 processing, etc. (#28261)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
parent
1e457650f3
commit
a5a6732508
3 changed files with 13 additions and 5 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue