HAL_*_TIMER_RATE => *_TIMER_RATE
This commit is contained in:
@ -745,8 +745,8 @@ void Planner::calculate_trapezoid_for_block(block_t* const block, const float &e
|
||||
|
||||
#if ENABLED(S_CURVE_ACCELERATION)
|
||||
// Jerk controlled speed requires to express speed versus time, NOT steps
|
||||
uint32_t acceleration_time = ((float)(cruise_rate - initial_rate) / accel) * (HAL_STEPPER_TIMER_RATE),
|
||||
deceleration_time = ((float)(cruise_rate - final_rate) / accel) * (HAL_STEPPER_TIMER_RATE);
|
||||
uint32_t acceleration_time = ((float)(cruise_rate - initial_rate) / accel) * (STEPPER_TIMER_RATE),
|
||||
deceleration_time = ((float)(cruise_rate - final_rate) / accel) * (STEPPER_TIMER_RATE);
|
||||
|
||||
// And to offload calculations from the ISR, we also calculate the inverse of those times here
|
||||
uint32_t acceleration_time_inverse = get_period_inverse(acceleration_time);
|
||||
@ -2097,11 +2097,11 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
|
||||
block->acceleration_steps_per_s2 = accel;
|
||||
block->acceleration = accel / steps_per_mm;
|
||||
#if DISABLED(S_CURVE_ACCELERATION)
|
||||
block->acceleration_rate = (uint32_t)(accel * (4096.0 * 4096.0 / (HAL_STEPPER_TIMER_RATE)));
|
||||
block->acceleration_rate = (uint32_t)(accel * (4096.0 * 4096.0 / (STEPPER_TIMER_RATE)));
|
||||
#endif
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
if (block->use_advance_lead) {
|
||||
block->advance_speed = (HAL_STEPPER_TIMER_RATE) / (extruder_advance_K * block->e_D_ratio * block->acceleration * axis_steps_per_mm[E_AXIS_N]);
|
||||
block->advance_speed = (STEPPER_TIMER_RATE) / (extruder_advance_K * block->e_D_ratio * block->acceleration * axis_steps_per_mm[E_AXIS_N]);
|
||||
#if ENABLED(LA_DEBUG)
|
||||
if (extruder_advance_K * block->e_D_ratio * block->acceleration * 2 < SQRT(block->nominal_speed_sqr) * block->e_D_ratio)
|
||||
SERIAL_ECHOLNPGM("More than 2 steps per eISR loop executed.");
|
||||
|
@ -1443,7 +1443,7 @@ void Stepper::stepper_pulse_phase_isr() {
|
||||
uint32_t Stepper::stepper_block_phase_isr() {
|
||||
|
||||
// If no queued movements, just wait 1ms for the next move
|
||||
uint32_t interval = (HAL_STEPPER_TIMER_RATE / 1000);
|
||||
uint32_t interval = (STEPPER_TIMER_RATE / 1000);
|
||||
|
||||
// If there is a current block
|
||||
if (current_block) {
|
||||
|
@ -327,7 +327,7 @@ class Stepper {
|
||||
|
||||
#ifdef CPU_32_BIT
|
||||
// In case of high-performance processor, it is able to calculate in real-time
|
||||
timer = uint32_t(HAL_STEPPER_TIMER_RATE) / step_rate;
|
||||
timer = uint32_t(STEPPER_TIMER_RATE) / step_rate;
|
||||
#else
|
||||
constexpr uint32_t min_step_rate = F_CPU / 500000U;
|
||||
NOLESS(step_rate, min_step_rate);
|
||||
|
Reference in New Issue
Block a user