mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-08-09 06:45:07 -06:00
parent
b1239a42a8
commit
1e525c5976
1 changed files with 2 additions and 2 deletions
|
@ -801,8 +801,8 @@ void Planner::calculate_trapezoid_for_block(block_t * const block, const_float_t
|
|||
const int32_t accel = block->acceleration_steps_per_s2;
|
||||
float inverse_accel = 0.0f;
|
||||
if (accel != 0) {
|
||||
const float inverse_accel = 1.0f / accel,
|
||||
half_inverse_accel = 0.5f * inverse_accel,
|
||||
inverse_accel = 1.0f / accel;
|
||||
const float half_inverse_accel = 0.5f * inverse_accel,
|
||||
nominal_rate_sq = sq(float(block->nominal_rate)),
|
||||
// Steps required for acceleration, deceleration to/from nominal rate
|
||||
decelerate_steps_float = half_inverse_accel * (nominal_rate_sq - sq(float(final_rate)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue