Skip to content

Commit

Permalink
Endstop interrupt refinement
Browse files Browse the repository at this point in the history
At the start of a move, check if the endstops are already triggered.
The 'change' interrupts will not see a change if already triggered.
  • Loading branch information
AnHardt committed Nov 19, 2016
1 parent 79c8591 commit 88b38ea
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Marlin/stepper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,11 @@ void Stepper::isr() {

step_events_completed = 0;

#if ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
e_hit = 2; // Needed for the case an endstop is already triggered before the new move begins.
// No 'change' can be detected.
#endif

#if ENABLED(Z_LATE_ENABLE)
if (current_block->steps[Z_AXIS] > 0) {
enable_z();
Expand Down

0 comments on commit 88b38ea

Please sign in to comment.