Browse Source

Fix 5 mixing steppers

Jeonghwan Roh 7 years ago
parent
commit
59cf217e77
2 changed files with 18 additions and 5 deletions
  1. 4
    1
      Marlin/src/Marlin.h
  2. 14
    4
      Marlin/src/feature/power.cpp

+ 4
- 1
Marlin/src/Marlin.h View File

80
   /**
80
   /**
81
    * Mixing steppers synchronize their enable (and direction) together
81
    * Mixing steppers synchronize their enable (and direction) together
82
    */
82
    */
83
-  #if MIXING_STEPPERS > 3
83
+  #if MIXING_STEPPERS > 4
84
+    #define  enable_E0() { E0_ENABLE_WRITE( E_ENABLE_ON); E1_ENABLE_WRITE( E_ENABLE_ON); E2_ENABLE_WRITE( E_ENABLE_ON); E3_ENABLE_WRITE( E_ENABLE_ON); E4_ENABLE_WRITE( E_ENABLE_ON); }
85
+    #define disable_E0() { E0_ENABLE_WRITE(!E_ENABLE_ON); E1_ENABLE_WRITE(!E_ENABLE_ON); E2_ENABLE_WRITE(!E_ENABLE_ON); E3_ENABLE_WRITE(!E_ENABLE_ON); E4_ENABLE_WRITE(!E_ENABLE_ON); }
86
+  #elif MIXING_STEPPERS > 3
84
     #define  enable_E0() { E0_ENABLE_WRITE( E_ENABLE_ON); E1_ENABLE_WRITE( E_ENABLE_ON); E2_ENABLE_WRITE( E_ENABLE_ON); E3_ENABLE_WRITE( E_ENABLE_ON); }
87
     #define  enable_E0() { E0_ENABLE_WRITE( E_ENABLE_ON); E1_ENABLE_WRITE( E_ENABLE_ON); E2_ENABLE_WRITE( E_ENABLE_ON); E3_ENABLE_WRITE( E_ENABLE_ON); }
85
     #define disable_E0() { E0_ENABLE_WRITE(!E_ENABLE_ON); E1_ENABLE_WRITE(!E_ENABLE_ON); E2_ENABLE_WRITE(!E_ENABLE_ON); E3_ENABLE_WRITE(!E_ENABLE_ON); }
88
     #define disable_E0() { E0_ENABLE_WRITE(!E_ENABLE_ON); E1_ENABLE_WRITE(!E_ENABLE_ON); E2_ENABLE_WRITE(!E_ENABLE_ON); E3_ENABLE_WRITE(!E_ENABLE_ON); }
86
   #elif MIXING_STEPPERS > 2
89
   #elif MIXING_STEPPERS > 2

+ 14
- 4
Marlin/src/feature/power.cpp View File

50
     if (controllerFanSpeed > 0) return true;
50
     if (controllerFanSpeed > 0) return true;
51
   #endif
51
   #endif
52
 
52
 
53
+  // If any of the drivers or the bed are enabled...
53
   if (X_ENABLE_READ == X_ENABLE_ON || Y_ENABLE_READ == Y_ENABLE_ON || Z_ENABLE_READ == Z_ENABLE_ON
54
   if (X_ENABLE_READ == X_ENABLE_ON || Y_ENABLE_READ == Y_ENABLE_ON || Z_ENABLE_READ == Z_ENABLE_ON
54
     #if HAS_HEATED_BED
55
     #if HAS_HEATED_BED
55
       || thermalManager.soft_pwm_amount_bed > 0
56
       || thermalManager.soft_pwm_amount_bed > 0
56
     #endif
57
     #endif
57
-      || E0_ENABLE_READ == E_ENABLE_ON // If any of the drivers are enabled...
58
+      #if HAS_X2_ENABLE
59
+        || X2_ENABLE_READ == X_ENABLE_ON
60
+      #endif
61
+      #if HAS_Y2_ENABLE
62
+        || Y2_ENABLE_READ == Y_ENABLE_ON
63
+      #endif
64
+      #if HAS_Z2_ENABLE
65
+        || Z2_ENABLE_READ == Z_ENABLE_ON
66
+      #endif
67
+      || E0_ENABLE_READ == E_ENABLE_ON
58
       #if E_STEPPERS > 1
68
       #if E_STEPPERS > 1
59
         || E1_ENABLE_READ == E_ENABLE_ON
69
         || E1_ENABLE_READ == E_ENABLE_ON
60
-        #if HAS_X2_ENABLE
61
-          || X2_ENABLE_READ == X_ENABLE_ON
62
-        #endif
63
         #if E_STEPPERS > 2
70
         #if E_STEPPERS > 2
64
             || E2_ENABLE_READ == E_ENABLE_ON
71
             || E2_ENABLE_READ == E_ENABLE_ON
65
           #if E_STEPPERS > 3
72
           #if E_STEPPERS > 3
66
               || E3_ENABLE_READ == E_ENABLE_ON
73
               || E3_ENABLE_READ == E_ENABLE_ON
74
+            #if E_STEPPERS > 4
75
+                || E4_ENABLE_READ == E_ENABLE_ON
76
+            #endif
67
           #endif
77
           #endif
68
         #endif
78
         #endif
69
       #endif
79
       #endif

Loading…
Cancel
Save