Kaynağa Gözat

Fix MK2_MULTIPLEXER stepper indirection

Addressing #8544
Scott Lahteine 7 yıl önce
ebeveyn
işleme
7cf4009838
1 değiştirilmiş dosya ile 6 ekleme ve 8 silme
  1. 6
    8
      Marlin/stepper_indirection.h

+ 6
- 8
Marlin/stepper_indirection.h Dosyayı Görüntüle

@@ -429,6 +429,10 @@
429 429
     #define NORM_E_DIR() { switch (current_block->active_extruder) { case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 1: E0_DIR_WRITE(INVERT_E0_DIR); break; case 2: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 3: E1_DIR_WRITE(INVERT_E1_DIR); } }
430 430
     #define REV_E_DIR() { switch (current_block->active_extruder) { case 0: E0_DIR_WRITE(INVERT_E0_DIR); break; case 1: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 2: E1_DIR_WRITE(INVERT_E1_DIR); break; case 3: E1_DIR_WRITE(!INVERT_E1_DIR); } }
431 431
   #endif
432
+#elif ENABLED(MK2_MULTIPLEXER) // Even-numbered steppers are reversed
433
+  #define E_STEP_WRITE(v) E0_STEP_WRITE(v)
434
+  #define NORM_E_DIR() E0_DIR_WRITE(TEST(current_block->active_extruder, 0) ? !INVERT_E0_DIR: INVERT_E0_DIR)
435
+  #define REV_E_DIR() E0_DIR_WRITE(TEST(current_block->active_extruder, 0) ? INVERT_E0_DIR: !INVERT_E0_DIR)
432 436
 #elif EXTRUDERS > 4
433 437
   #define E_STEP_WRITE(v) { switch (current_block->active_extruder) { case 0: E0_STEP_WRITE(v); break; case 1: E1_STEP_WRITE(v); break; case 2: E2_STEP_WRITE(v); break; case 3: E3_STEP_WRITE(v); break; case 4: E4_STEP_WRITE(v); } }
434 438
   #define NORM_E_DIR() { switch (current_block->active_extruder) { case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 1: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 2: E2_DIR_WRITE(!INVERT_E2_DIR); break; case 3: E3_DIR_WRITE(!INVERT_E3_DIR); break; case 4: E4_DIR_WRITE(!INVERT_E4_DIR); } }
@@ -472,14 +476,8 @@
472 476
   #endif
473 477
 #else
474 478
   #define E_STEP_WRITE(v) E0_STEP_WRITE(v)
475
-  #if ENABLED(MK2_MULTIPLEXER)
476
-    // Even-numbered steppers are reversed
477
-    #define NORM_E_DIR() E0_DIR_WRITE(TEST(current_block->active_extruder, 0) ? !INVERT_E0_DIR: INVERT_E0_DIR)
478
-    #define REV_E_DIR() E0_DIR_WRITE(TEST(current_block->active_extruder, 0) ? INVERT_E0_DIR: !INVERT_E0_DIR)
479
-  #else
480
-    #define NORM_E_DIR() E0_DIR_WRITE(!INVERT_E0_DIR)
481
-    #define REV_E_DIR() E0_DIR_WRITE(INVERT_E0_DIR)
482
-  #endif
479
+  #define NORM_E_DIR() E0_DIR_WRITE(!INVERT_E0_DIR)
480
+  #define REV_E_DIR() E0_DIR_WRITE(INVERT_E0_DIR)
483 481
 #endif
484 482
 
485 483
 #endif // STEPPER_INDIRECTION_H

Loading…
İptal
Kaydet