Skip to content

Commit

Permalink
📝 Update M493 (FT_MOTION) comments (MarlinFirmware#26620)
Browse files Browse the repository at this point in the history
Co-authored-by: Scott Lahteine <[email protected]>
  • Loading branch information
narno2202 and thinkyhead authored Jan 3, 2024
1 parent 6d40776 commit 68b7802
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 33 deletions.
43 changes: 25 additions & 18 deletions Marlin/src/gcode/feature/ft_motion/M493.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ void say_shaping() {
SERIAL_ECHOPGM(" with ");
switch (ftMotion.cfg.mode) {
default: break;
case ftMotionMode_ZV: SERIAL_ECHOPGM("ZV"); break;
case ftMotionMode_ZVD: SERIAL_ECHOPGM("ZVD"); break;
case ftMotionMode_ZVDD: SERIAL_ECHOPGM("ZVDD"); break;
case ftMotionMode_ZVDDD: SERIAL_ECHOPGM("ZVDDD"); break;
case ftMotionMode_EI: SERIAL_ECHOPGM("EI"); break;
case ftMotionMode_2HEI: SERIAL_ECHOPGM("2 Hump EI"); break;
case ftMotionMode_3HEI: SERIAL_ECHOPGM("3 Hump EI"); break;
case ftMotionMode_MZV: SERIAL_ECHOPGM("MZV"); break;
case ftMotionMode_ZV: SERIAL_ECHOPGM("ZV"); break;
case ftMotionMode_ZVD: SERIAL_ECHOPGM("ZVD"); break;
case ftMotionMode_ZVDD: SERIAL_ECHOPGM("ZVDD"); break;
case ftMotionMode_ZVDDD: SERIAL_ECHOPGM("ZVDDD"); break;
case ftMotionMode_EI: SERIAL_ECHOPGM("EI"); break;
case ftMotionMode_2HEI: SERIAL_ECHOPGM("2 Hump EI"); break;
case ftMotionMode_3HEI: SERIAL_ECHOPGM("3 Hump EI"); break;
case ftMotionMode_MZV: SERIAL_ECHOPGM("MZV"); break;
//case ftMotionMode_DISCTF: SERIAL_ECHOPGM("discrete transfer functions"); break;
//case ftMotionMode_ULENDO_FBS: SERIAL_ECHOPGM("Ulendo FBS."); return;
}
Expand Down Expand Up @@ -129,14 +129,17 @@ void GcodeSuite::M493_report(const bool forReplay/*=true*/) {
* M493: Set Fixed-time Motion Control parameters
*
* S<mode> Set the motion / shaping mode. Shaping requires an X axis, at the minimum.
* 0: NORMAL
* 1: FIXED-TIME
* 10: ZV
* 11: ZVD
* 12: EI
* 13: 2HEI
* 14: 3HEI
* 15: MZV
*
* 0: Standard Motion
* 1: Fixed-Time Motion
* 10: ZV : Zero Vibration
* 11: ZVD : Zero Vibration and Derivative
* 12: ZVDD : Zero Vibration, Derivative, and Double Derivative
* 13: ZVDDD : Zero Vibration, Derivative, Double Derivative, and Triple Derivative
* 14: EI : Extra-Intensive
* 15: 2HEI : 2-Hump Extra-Intensive
* 16: 3HEI : 3-Hump Extra-Intensive
* 17: MZV : Mass-based Zero Vibration
*
* P<bool> Enable (1) or Disable (0) Linear Advance pressure control
*
Expand All @@ -147,11 +150,15 @@ void GcodeSuite::M493_report(const bool forReplay/*=true*/) {
* 1: Z-based (Requires a Z axis)
* 2: Mass-based (Requires X and E axes)
*
* A<Hz> Set static/base frequency for the X axis
* F<Hz> Set frequency scaling for the X axis
* A<Hz> Set static/base frequency for the X axis
* F<Hz> Set frequency scaling for the X axis
* I 0.0 Set damping ratio for the X axis
* Q 0.00 Set the vibration tolerance for the X axis
*
* B<Hz> Set static/base frequency for the Y axis
* H<Hz> Set frequency scaling for the Y axis
* J 0.0 Set damping ratio for the Y axis
* R 0.00 Set the vibration tolerance for the Y axis
*/
void GcodeSuite::M493() {
struct { bool update_n:1, update_a:1, reset_ft:1, report_h:1; } flag = { false };
Expand Down
28 changes: 13 additions & 15 deletions Marlin/src/module/ft_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,22 @@
#include "../core/types.h"

typedef enum FXDTICtrlMode : uint8_t {
ftMotionMode_DISABLED = 0U,
ftMotionMode_ENABLED = 1U,
//ftMotionMode_ULENDO_FBS = 2U,
ftMotionMode_ZV = 10U,
ftMotionMode_ZVD = 11U,
ftMotionMode_ZVDD = 12U,
ftMotionMode_ZVDDD = 13U,
ftMotionMode_EI = 14U,
ftMotionMode_2HEI = 15U,
ftMotionMode_3HEI = 16U,
ftMotionMode_MZV = 17U,
//ftMotionMode_DISCTF = 20U
ftMotionMode_DISABLED = 0, // Standard Motion
ftMotionMode_ENABLED = 1, // Time-Based Motion
ftMotionMode_ZV = 10, // Zero Vibration
ftMotionMode_ZVD = 11, // Zero Vibration and Derivative
ftMotionMode_ZVDD = 12, // Zero Vibration, Derivative, and Double Derivative
ftMotionMode_ZVDDD = 13, // Zero Vibration, Derivative, Double Derivative, and Triple Derivative
ftMotionMode_EI = 14, // Extra-Intensive
ftMotionMode_2HEI = 15, // 2-Hump Extra-Intensive
ftMotionMode_3HEI = 16, // 3-Hump Extra-Intensive
ftMotionMode_MZV = 17 // Mass-based Zero Vibration
} ftMotionMode_t;

enum dynFreqMode_t : uint8_t {
dynFreqMode_DISABLED = 0U,
dynFreqMode_Z_BASED = 1U,
dynFreqMode_MASS_BASED = 2U
dynFreqMode_DISABLED = 0,
dynFreqMode_Z_BASED = 1,
dynFreqMode_MASS_BASED = 2
};

#define IS_EI_MODE(N) WITHIN(N, ftMotionMode_EI, ftMotionMode_3HEI)
Expand Down

0 comments on commit 68b7802

Please sign in to comment.