Skip to content

Commit

Permalink
🐛 Fix homing with FT_MOTION (MarlinFirmware#26595)
Browse files Browse the repository at this point in the history
  • Loading branch information
narno2202 authored Dec 31, 2023
1 parent 5d1ede0 commit 95878df
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions Marlin/src/module/ft_motion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -501,11 +501,13 @@ void FTMotion::loadBlockData(block_t * const current_block) {

ratio = moveDist * oneOverLength;

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

f_s = spm * current_block->initial_rate; // (steps/s) Start feedrate

const float f_e = spm * current_block->final_rate; // (steps/s) End feedrate

/* Keep for comprehension
const float a = current_block->acceleration, // (mm/s^2) Same magnitude for acceleration or deceleration
oneby2a = 1.0f / (2.0f * a), // (s/mm) Time to accelerate or decelerate one mm (i.e., oneby2a * 2
oneby2d = -oneby2a; // (s/mm) Time to accelerate or decelerate one mm (i.e., oneby2a * 2
Expand All @@ -527,10 +529,6 @@ void FTMotion::loadBlockData(block_t * const current_block) {
T3 = (F_n - f_e) / a; // (s) Decel Time = difference in feedrate over acceleration
*/

const float spm = totalLength / current_block->step_event_count,
f_s = spm * current_block->initial_rate,
f_e = spm * current_block->final_rate;

const float accel = current_block->acceleration,
oneOverAccel = 1.0f / accel;

Expand Down

0 comments on commit 95878df

Please sign in to comment.