Browse Source

advance_isr changed

PavelSindler 6 years ago
parent
commit
997937bd4c
1 changed files with 3 additions and 4 deletions
  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() {