Skip to content

Commit af4ba2b

Browse files
committed
🐛 Minor Fixed-Time Motion patches
1 parent 40895cb commit af4ba2b

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

Marlin/src/MarlinCore.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1624,6 +1624,11 @@ void setup() {
16241624
SETUP_RUN(bdl.init(I2C_BD_SDA_PIN, I2C_BD_SCL_PIN, I2C_BD_DELAY));
16251625
#endif
16261626

1627+
1628+
#if ENABLED(FT_MOTION)
1629+
SETUP_RUN(fxdTiCtrl.init());
1630+
#endif
1631+
16271632
marlin_state = MF_RUNNING;
16281633

16291634
#ifdef STARTUP_TUNE

Marlin/src/inc/SanityCheck.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4030,6 +4030,13 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
40304030
#endif
40314031
#endif
40324032

4033+
/**
4034+
* Fixed-Time Motion limitations
4035+
*/
4036+
#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))
4037+
#error "FT_MOTION is currently limited to machines with 3 linear axes and a single extruder."
4038+
#endif
4039+
40334040
// Multi-Stepping Limit
40344041
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.");
40354042

Marlin/src/module/ft_motion.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,6 @@ void FxdTiCtrl::loop() {
211211

212212
if (!cfg_mode) return;
213213

214-
static bool initd = false;
215-
if (!initd) { init(); initd = true; }
216-
217214
// Handle block abort with the following sequence:
218215
// 1. Zero out commands in stepper ISR.
219216
// 2. Drain the motion buffer, stop processing until they are emptied.

Marlin/src/module/stepper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3466,7 +3466,7 @@ void Stepper::report_positions() {
34663466

34673467
#if HAS_Z_AXIS
34683468
// Update step counts
3469-
if (z_step) count_position.z += z_dir ? -1 : 1;
3469+
if (z_step) count_position.z += z_dir ? 1 : -1;
34703470
#endif
34713471

34723472
AWAIT_HIGH_PULSE();

0 commit comments

Comments
 (0)