Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix homing with FT_MOTION #26595

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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