瀏覽代碼

Endstop interrupt refinement

At the start of a move, check if the endstops are already triggered.
The 'change' interrupts will not see a change if already triggered.
AnHardt 8 年之前
父節點
當前提交
88b38eafd8
共有 1 個檔案被更改,包括 5 行新增0 行删除
  1. 5
    0
      Marlin/stepper.cpp

+ 5
- 0
Marlin/stepper.cpp 查看文件

@@ -359,6 +359,11 @@ void Stepper::isr() {
359 359
 
360 360
       step_events_completed = 0;
361 361
 
362
+      #if ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
363
+        e_hit = 2; // Needed for the case an endstop is already triggered before the new move begins.
364
+                   // No 'change' can be detected.
365
+      #endif
366
+
362 367
       #if ENABLED(Z_LATE_ENABLE)
363 368
         if (current_block->steps[Z_AXIS] > 0) {
364 369
           enable_z();

Loading…
取消
儲存