HAL_STEPPER_TIMER_RATE => STEPPER_TIMER_RATE
This commit is contained in:
parent
1d048f5192
commit
87eddf35e2
@ -95,8 +95,8 @@ inline uint8_t HAL_get_reset_source(void) { return MCUSR; }
|
||||
#define TEMP_TIMER_NUM 0
|
||||
#define PULSE_TIMER_NUM STEP_TIMER_NUM
|
||||
|
||||
#define HAL_STEPPER_TIMER_RATE HAL_TIMER_RATE
|
||||
#define HAL_TICKS_PER_US ((HAL_STEPPER_TIMER_RATE) / 1000000) // Cannot be of type double
|
||||
#define STEPPER_TIMER_RATE HAL_TIMER_RATE
|
||||
#define HAL_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // Cannot be of type double
|
||||
#define STEPPER_TIMER_PRESCALE 8
|
||||
#define STEP_TIMER_MIN_INTERVAL 8 // minimum time in µs between stepper interrupts
|
||||
|
||||
|
@ -727,8 +727,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);
|
||||
@ -2079,11 +2079,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.");
|
||||
|
@ -1393,7 +1393,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) {
|
||||
|
Loading…
Reference in New Issue
Block a user