|
|
@ -180,10 +180,7 @@ bool Stepper::abort_current_block; |
|
|
|
uint32_t Stepper::acceleration_time, Stepper::deceleration_time; |
|
|
|
uint8_t Stepper::steps_per_isr; |
|
|
|
|
|
|
|
#if DISABLED(ADAPTIVE_STEP_SMOOTHING) |
|
|
|
constexpr |
|
|
|
#endif |
|
|
|
uint8_t Stepper::oversampling_factor; |
|
|
|
TERN(ADAPTIVE_STEP_SMOOTHING,,constexpr) uint8_t Stepper::oversampling_factor; |
|
|
|
|
|
|
|
xyze_long_t Stepper::delta_error{0}; |
|
|
|
|
|
|
@ -2099,9 +2096,8 @@ uint32_t Stepper::block_phase_isr() { |
|
|
|
// No acceleration / deceleration time elapsed so far
|
|
|
|
acceleration_time = deceleration_time = 0; |
|
|
|
|
|
|
|
uint8_t oversampling = 0; // Assume no axis smoothing (via oversampling)
|
|
|
|
|
|
|
|
#if ENABLED(ADAPTIVE_STEP_SMOOTHING) |
|
|
|
uint8_t oversampling = 0; // Assume no axis smoothing (via oversampling)
|
|
|
|
// Decide if axis smoothing is possible
|
|
|
|
uint32_t max_rate = current_block->nominal_rate; // Get the maximum rate (maximum event speed)
|
|
|
|
while (max_rate < MIN_STEP_ISR_FREQUENCY) { // As long as more ISRs are possible...
|
|
|
@ -2110,6 +2106,8 @@ uint32_t Stepper::block_phase_isr() { |
|
|
|
++oversampling; // Increase the oversampling (used for left-shift)
|
|
|
|
} |
|
|
|
oversampling_factor = oversampling; // For all timer interval calculations
|
|
|
|
#else |
|
|
|
constexpr uint8_t oversampling = 0; |
|
|
|
#endif |
|
|
|
|
|
|
|
// Based on the oversampling factor, do the calculations
|
|
|
|