浏览代码

Check for serial roughtly in the middle of the stepper isr

Yuri D'Elia 6 年之前
父节点
当前提交
fa7ecfc38e
共有 1 个文件被更改,包括 6 次插入0 次删除
  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