Skip to content

Commit 1f8587d

Browse files
mh-dmthinkyhead
authored andcommitted
πŸ§‘β€πŸ’» Adjust pulse_phase_isr code guards (MarlinFirmware#27112)
1 parent aa778c3 commit 1f8587d

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

β€ŽMarlin/src/module/stepper.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1610,7 +1610,7 @@ void Stepper::isr() {
16101610
#if MINIMUM_STEPPER_PULSE || MAXIMUM_STEPPER_RATE
16111611
#define ISR_PULSE_CONTROL 1
16121612
#endif
1613-
#if ISR_PULSE_CONTROL && DISABLED(I2S_STEPPER_STREAM)
1613+
#if ISR_PULSE_CONTROL && MULTISTEPPING_LIMIT > 1 && DISABLED(I2S_STEPPER_STREAM)
16141614
#define ISR_MULTI_STEPS 1
16151615
#endif
16161616

@@ -1655,10 +1655,11 @@ void Stepper::pulse_phase_isr() {
16551655
// Just update the value we will get at the end of the loop
16561656
step_events_completed += events_to_do;
16571657

1658-
// Take multiple steps per interrupt (For high speed moves)
1659-
#if ISR_MULTI_STEPS
1658+
TERN_(ISR_PULSE_CONTROL, USING_TIMED_PULSE());
1659+
1660+
// Take multiple steps per interrupt. For high speed moves.
1661+
#if ENABLED(ISR_MULTI_STEPS)
16601662
bool firstStep = true;
1661-
USING_TIMED_PULSE();
16621663
#endif
16631664
xyze_bool_t step_needed{0};
16641665

@@ -1944,7 +1945,7 @@ void Stepper::pulse_phase_isr() {
19441945
TERN_(I2S_STEPPER_STREAM, i2s_push_sample());
19451946

19461947
// TODO: need to deal with MINIMUM_STEPPER_PULSE over i2s
1947-
#if ISR_MULTI_STEPS
1948+
#if ISR_PULSE_CONTROL
19481949
START_TIMED_PULSE();
19491950
AWAIT_HIGH_PULSE();
19501951
#endif

0 commit comments

Comments
Β (0)