Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fully guard multistepping code in Stepper::pulse_phase_isr() #27112

Merged
merged 2 commits into from
Jun 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions Marlin/src/module/stepper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1722,7 +1722,7 @@ void Stepper::isr() {
#if MINIMUM_STEPPER_PULSE_NS || MAXIMUM_STEPPER_RATE
#define ISR_PULSE_CONTROL 1
#endif
#if ISR_PULSE_CONTROL && DISABLED(I2S_STEPPER_STREAM)
#if ISR_PULSE_CONTROL && MULTISTEPPING_LIMIT > 1 && DISABLED(I2S_STEPPER_STREAM)
#define ISR_MULTI_STEPS 1
#endif

Expand Down Expand Up @@ -1771,10 +1771,11 @@ void Stepper::pulse_phase_isr() {
// Just update the value we will get at the end of the loop
step_events_completed += events_to_do;

// Take multiple steps per interrupt (For high speed moves)
#if ISR_MULTI_STEPS
TERN_(ISR_PULSE_CONTROL, USING_TIMED_PULSE());

// Take multiple steps per interrupt. For high speed moves.
#if ENABLED(ISR_MULTI_STEPS)
bool firstStep = true;
USING_TIMED_PULSE();
#endif

// Direct Stepping page?
Expand Down Expand Up @@ -2080,7 +2081,7 @@ void Stepper::pulse_phase_isr() {
TERN_(I2S_STEPPER_STREAM, i2s_push_sample());

// TODO: need to deal with MINIMUM_STEPPER_PULSE_NS over i2s
#if ISR_MULTI_STEPS
#if ISR_PULSE_CONTROL
START_TIMED_PULSE();
AWAIT_HIGH_PULSE();
#endif
Expand Down
Loading