Commit da406f3b authored by MagoKimbra's avatar MagoKimbra

Fix Stepper.cpp

parent da19d06e
...@@ -722,10 +722,7 @@ ISR(TIMER1_COMPA_vect) { ...@@ -722,10 +722,7 @@ ISR(TIMER1_COMPA_vect) {
#define STEP_START(axis, AXIS) \ #define STEP_START(axis, AXIS) \
_COUNTER(axis) += current_block->steps[_AXIS(AXIS)]; \ _COUNTER(axis) += current_block->steps[_AXIS(AXIS)]; \
if (_COUNTER(axis) > 0) { \ if (_COUNTER(axis) > 0) { _APPLY_STEP(AXIS)(!_INVERT_STEP_PIN(AXIS),0); }
_APPLY_STEP(AXIS)(!_INVERT_STEP_PIN(AXIS),0); \
_COUNTER(axis) -= current_block->step_event_count; \
count_position[_AXIS(AXIS)] += count_direction[_AXIS(AXIS)]; }
STEP_START(x, X); STEP_START(x, X);
STEP_START(y, Y); STEP_START(y, Y);
...@@ -750,7 +747,12 @@ ISR(TIMER1_COMPA_vect) { ...@@ -750,7 +747,12 @@ ISR(TIMER1_COMPA_vect) {
delayMicroseconds(STEPPER_HIGH_LOW_DELAY); delayMicroseconds(STEPPER_HIGH_LOW_DELAY);
#endif #endif
#define STEP_END(axis, AXIS) _APPLY_STEP(AXIS)(_INVERT_STEP_PIN(AXIS),0) #define STEP_END(axis, AXIS) \
if (_COUNTER(axis) > 0) { \
_COUNTER(axis) -= current_block->step_event_count; \
count_position[_AXIS(AXIS)] += count_direction[_AXIS(AXIS)]; \
_APPLY_STEP(AXIS)(_INVERT_STEP_PIN(AXIS),0); \
}
STEP_END(x, X); STEP_END(x, X);
STEP_END(y, Y); STEP_END(y, Y);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment