X-Git-Url: https://git.hcoop.net/clinton/Smoothieware.git/blobdiff_plain/9502f9d519c4c8fe56f8cfa0442048c2aa87371f..c8f4ee77e4b12186f0714ebee3d0e319fa516eaf:/src/modules/robot/Block.cpp diff --git a/src/modules/robot/Block.cpp b/src/modules/robot/Block.cpp index 060919d9..ff2a806d 100644 --- a/src/modules/robot/Block.cpp +++ b/src/modules/robot/Block.cpp @@ -109,7 +109,7 @@ void Block::calculate_trapezoid( float entryspeed, float exitspeed ) // How many steps to accelerate and decelerate float acceleration_per_second = this->rate_delta * THEKERNEL->stepper->get_acceleration_ticks_per_second(); // ( step/s^2) int accelerate_steps = ceilf( this->estimate_acceleration_distance( this->initial_rate, this->nominal_rate, acceleration_per_second ) ); - int decelerate_steps = floor( this->estimate_acceleration_distance( this->nominal_rate, this->final_rate, -acceleration_per_second ) ); + int decelerate_steps = floorf( this->estimate_acceleration_distance( this->nominal_rate, this->final_rate, -acceleration_per_second ) ); // Calculate the size of Plateau of Nominal Rate ( during which we don't accelerate nor decelerate, but just cruise ) int plateau_steps = this->steps_event_count - accelerate_steps - decelerate_steps;