eliminated step down-counter in stepper.c

This commit is contained in:
Simen Svale Skogsrud
2011-01-25 14:02:34 +01:00
parent 5977bd3748
commit 0c262b03c2
2 changed files with 7 additions and 9 deletions

View File

@@ -91,9 +91,9 @@ void calculate_trapezoid_for_block(struct Block *block, double entry_factor, dou
// have to use intersection_distance() to calculate when to abort acceleration and start braking
// in order to reach the final_rate exactly at the end of this block.
if (plateau_steps < 0) {
plateau_steps = 0;
accelerate_steps = ceil(
intersection_distance(block->initial_rate, final_rate, acceleration_per_minute, block->step_event_count));
plateau_steps = block->step_event_count-(2*accelerate_steps);
}
block->accelerate_until = accelerate_steps;