@@ -501,11 +501,13 @@ void FTMotion::loadBlockData(block_t * const current_block) {
501
501
502
502
ratio = moveDist * oneOverLength;
503
503
504
- /* Keep for comprehension
505
504
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
508
505
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
509
511
const float a = current_block->acceleration, // (mm/s^2) Same magnitude for acceleration or deceleration
510
512
oneby2a = 1.0f / (2.0f * a), // (s/mm) Time to accelerate or decelerate one mm (i.e., oneby2a * 2
511
513
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) {
527
529
T3 = (F_n - f_e) / a; // (s) Decel Time = difference in feedrate over acceleration
528
530
*/
529
531
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
-
534
532
const float accel = current_block->acceleration ,
535
533
oneOverAccel = 1 .0f / accel;
536
534
0 commit comments