|
@@ -1294,10 +1294,10 @@ void Planner::_buffer_steps(const int32_t (&target)[XYZE]
|
1294
|
1294
|
}
|
1295
|
1295
|
block->acceleration_steps_per_s2 = accel;
|
1296
|
1296
|
block->acceleration = accel / steps_per_mm;
|
1297
|
|
- block->acceleration_rate = (long)(accel * 16777216.0 / ((F_CPU) * 0.125)); // * 8.388608
|
|
1297
|
+ block->acceleration_rate = (long)(accel * (4096.0 * 4096.0 / (HAL_STEPPER_TIMER_RATE)));
|
1298
|
1298
|
#if ENABLED(LIN_ADVANCE)
|
1299
|
1299
|
if (block->use_advance_lead) {
|
1300
|
|
- block->advance_speed = ((F_CPU) * 0.125) / (extruder_advance_K * block->e_D_ratio * block->acceleration * axis_steps_per_mm[E_AXIS_N]);
|
|
1300
|
+ block->advance_speed = (HAL_STEPPER_TIMER_RATE) / (extruder_advance_K * block->e_D_ratio * block->acceleration * axis_steps_per_mm[E_AXIS_N]);
|
1301
|
1301
|
#if ENABLED(LA_DEBUG)
|
1302
|
1302
|
if (extruder_advance_K * block->e_D_ratio * block->acceleration * 2 < block->nominal_speed * block->e_D_ratio)
|
1303
|
1303
|
SERIAL_ECHOLNPGM("More than 2 steps per eISR loop executed.");
|