diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 5b4d33609d..5000f3673b 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -1624,6 +1624,11 @@ void setup() { SETUP_RUN(bdl.init(I2C_BD_SDA_PIN, I2C_BD_SCL_PIN, I2C_BD_DELAY)); #endif + + #if ENABLED(FT_MOTION) + SETUP_RUN(fxdTiCtrl.init()); + #endif + marlin_state = MF_RUNNING; #ifdef STARTUP_TUNE diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 223baf928d..e495d7a115 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -4030,6 +4030,13 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive."); #endif #endif +/** + * Fixed-Time Motion limitations + */ +#if ENABLED(FT_MOTION) && (NUM_AXES > 3 || E_STEPPERS > 1 || NUM_Z_STEPPERS > 1 || ANY(DUAL_X_CARRIAGE, HAS_DUAL_X_STEPPERS, HAS_DUAL_Y_STEPPERS, HAS_MULTI_EXTRUDER, MIXING_EXTRUDER)) + #error "FT_MOTION is currently limited to machines with 3 linear axes and a single extruder." +#endif + // Multi-Stepping Limit static_assert(WITHIN(MULTISTEPPING_LIMIT, 1, 128) && IS_POWER_OF_2(MULTISTEPPING_LIMIT), "MULTISTEPPING_LIMIT must be 1, 2, 4, 8, 16, 32, 64, or 128."); diff --git a/Marlin/src/module/ft_motion.cpp b/Marlin/src/module/ft_motion.cpp index 2fe3802529..bc6ba8d3e3 100644 --- a/Marlin/src/module/ft_motion.cpp +++ b/Marlin/src/module/ft_motion.cpp @@ -211,9 +211,6 @@ void FxdTiCtrl::loop() { if (!cfg_mode) return; - static bool initd = false; - if (!initd) { init(); initd = true; } - // Handle block abort with the following sequence: // 1. Zero out commands in stepper ISR. // 2. Drain the motion buffer, stop processing until they are emptied. diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index 140a539ef3..c7c053679a 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -3466,7 +3466,7 @@ void Stepper::report_positions() { #if HAS_Z_AXIS // Update step counts - if (z_step) count_position.z += z_dir ? -1 : 1; + if (z_step) count_position.z += z_dir ? 1 : -1; #endif AWAIT_HIGH_PULSE();