|
@@ -141,9 +141,10 @@ volatile signed char Stepper::count_direction[NUM_AXIS] = { 1, 1, 1, 1 };
|
141
|
141
|
long Stepper::counter_m[MIXING_STEPPERS];
|
142
|
142
|
#endif
|
143
|
143
|
|
144
|
|
-unsigned short Stepper::acc_step_rate; // needed for deceleration start point
|
145
|
144
|
uint8_t Stepper::step_loops, Stepper::step_loops_nominal;
|
146
|
|
-unsigned short Stepper::OCR1A_nominal;
|
|
145
|
+
|
|
146
|
+uint16_t Stepper::OCR1A_nominal,
|
|
147
|
+ Stepper::acc_step_rate; // needed for deceleration start point
|
147
|
148
|
|
148
|
149
|
volatile long Stepper::endstops_trigsteps[XYZ];
|
149
|
150
|
|
|
@@ -711,12 +712,12 @@ void Stepper::isr() {
|
711
|
712
|
NOMORE(acc_step_rate, current_block->nominal_rate);
|
712
|
713
|
|
713
|
714
|
// step_rate to timer interval
|
714
|
|
- const uint16_t timer = calc_timer(acc_step_rate);
|
|
715
|
+ const uint16_t interval = calc_timer_interval(acc_step_rate);
|
715
|
716
|
|
716
|
|
- SPLIT(timer); // split step into multiple ISRs if larger than ENDSTOP_NOMINAL_OCR_VAL
|
|
717
|
+ SPLIT(interval); // split step into multiple ISRs if larger than ENDSTOP_NOMINAL_OCR_VAL
|
717
|
718
|
_NEXT_ISR(ocr_val);
|
718
|
719
|
|
719
|
|
- acceleration_time += timer;
|
|
720
|
+ acceleration_time += interval;
|
720
|
721
|
|
721
|
722
|
#if ENABLED(LIN_ADVANCE)
|
722
|
723
|
|
|
@@ -728,7 +729,7 @@ void Stepper::isr() {
|
728
|
729
|
current_estep_rate[TOOL_E_INDEX] = ((uint32_t)acc_step_rate * current_block->abs_adv_steps_multiplier8) >> 17;
|
729
|
730
|
#endif
|
730
|
731
|
}
|
731
|
|
- eISR_Rate = adv_rate(e_steps[TOOL_E_INDEX], timer, step_loops);
|
|
732
|
+ eISR_Rate = adv_rate(e_steps[TOOL_E_INDEX], interval, step_loops);
|
732
|
733
|
|
733
|
734
|
#endif // LIN_ADVANCE
|
734
|
735
|
}
|
|
@@ -744,12 +745,12 @@ void Stepper::isr() {
|
744
|
745
|
step_rate = current_block->final_rate;
|
745
|
746
|
|
746
|
747
|
// step_rate to timer interval
|
747
|
|
- const uint16_t timer = calc_timer(step_rate);
|
|
748
|
+ const uint16_t interval = calc_timer_interval(step_rate);
|
748
|
749
|
|
749
|
|
- SPLIT(timer); // split step into multiple ISRs if larger than ENDSTOP_NOMINAL_OCR_VAL
|
|
750
|
+ SPLIT(interval); // split step into multiple ISRs if larger than ENDSTOP_NOMINAL_OCR_VAL
|
750
|
751
|
_NEXT_ISR(ocr_val);
|
751
|
752
|
|
752
|
|
- deceleration_time += timer;
|
|
753
|
+ deceleration_time += interval;
|
753
|
754
|
|
754
|
755
|
#if ENABLED(LIN_ADVANCE)
|
755
|
756
|
|
|
@@ -761,7 +762,7 @@ void Stepper::isr() {
|
761
|
762
|
current_estep_rate[TOOL_E_INDEX] = ((uint32_t)step_rate * current_block->abs_adv_steps_multiplier8) >> 17;
|
762
|
763
|
#endif
|
763
|
764
|
}
|
764
|
|
- eISR_Rate = adv_rate(e_steps[TOOL_E_INDEX], timer, step_loops);
|
|
765
|
+ eISR_Rate = adv_rate(e_steps[TOOL_E_INDEX], interval, step_loops);
|
765
|
766
|
|
766
|
767
|
#endif // LIN_ADVANCE
|
767
|
768
|
}
|