Browse Source

Check for serial roughtly in the middle of the stepper isr

Yuri D'Elia 5 years ago
parent
commit
fa7ecfc38e
1 changed files with 6 additions and 0 deletions
  1. 6 0
      Firmware/stepper.cpp

+ 6 - 0
Firmware/stepper.cpp

@@ -830,6 +830,12 @@ FORCE_INLINE void isr() {
       //WRITE_NC(LOGIC_ANALYZER_CH1, false);
     }
 
+#ifdef LIN_ADVANCE
+    // Check for serial chars. This executes roughtly between 50-60% of the total length of the isr,
+    // making this spot a much better choice than checking during esteps
+    MSerial.checkRx();
+#endif
+
     // If current block is finished, reset pointer
     if (step_events_completed.wide >= current_block->step_event_count.wide) {
 #ifdef FILAMENT_SENSOR