浏览代码

advance_isr changed

PavelSindler 7 年之前
父节点
当前提交
997937bd4c
共有 1 个文件被更改,包括 3 次插入4 次删除
  1. 3 4
      Firmware/stepper.cpp

+ 3 - 4
Firmware/stepper.cpp

@@ -735,8 +735,6 @@ void isr() {
 
   void advance_isr() {
 
-    nextAdvanceISR = eISR_Rate;
-
     if (e_steps) {
       bool dir =
       #ifdef SNMM
@@ -753,9 +751,10 @@ void isr() {
         WRITE(E0_STEP_PIN, INVERT_E_STEP_PIN);
       }
 	}
-	else if(eISR_Rate == 0) {
-	  nextAdvanceISR = ADV_NEVER;
+	else{
+		eISR_Rate = ADV_NEVER;
 	}
+	nextAdvanceISR = eISR_Rate;
   }
 
   void advance_isr_scheduler() {