Skip to content

Commit 95878df

Browse files
authored
🐛 Fix homing with FT_MOTION (MarlinFirmware#26595)
1 parent 5d1ede0 commit 95878df

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

Marlin/src/module/ft_motion.cpp

+5-7
Original file line numberDiff line numberDiff line change
@@ -501,11 +501,13 @@ void FTMotion::loadBlockData(block_t * const current_block) {
501501

502502
ratio = moveDist * oneOverLength;
503503

504-
/* Keep for comprehension
505504
const float spm = totalLength / current_block->step_event_count; // (steps/mm) Distance for each step
506-
f_s = spm * current_block->initial_rate, // (steps/s) Start feedrate
507-
f_e = spm * current_block->final_rate; // (steps/s) End feedrate
508505

506+
f_s = spm * current_block->initial_rate; // (steps/s) Start feedrate
507+
508+
const float f_e = spm * current_block->final_rate; // (steps/s) End feedrate
509+
510+
/* Keep for comprehension
509511
const float a = current_block->acceleration, // (mm/s^2) Same magnitude for acceleration or deceleration
510512
oneby2a = 1.0f / (2.0f * a), // (s/mm) Time to accelerate or decelerate one mm (i.e., oneby2a * 2
511513
oneby2d = -oneby2a; // (s/mm) Time to accelerate or decelerate one mm (i.e., oneby2a * 2
@@ -527,10 +529,6 @@ void FTMotion::loadBlockData(block_t * const current_block) {
527529
T3 = (F_n - f_e) / a; // (s) Decel Time = difference in feedrate over acceleration
528530
*/
529531

530-
const float spm = totalLength / current_block->step_event_count,
531-
f_s = spm * current_block->initial_rate,
532-
f_e = spm * current_block->final_rate;
533-
534532
const float accel = current_block->acceleration,
535533
oneOverAccel = 1.0f / accel;
536534

0 commit comments

Comments
 (0)