Browse Source

Fix 5 mixing steppers

Jeonghwan Roh 5 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,7 +80,10 @@ void manage_inactivity(const bool ignore_stepper_queue=false);
80 80
   /**
81 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 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 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 89
   #elif MIXING_STEPPERS > 2

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

@@ -50,20 +50,30 @@ bool Power::is_power_needed() {
50 50
     if (controllerFanSpeed > 0) return true;
51 51
   #endif
52 52
 
53
+  // If any of the drivers or the bed are enabled...
53 54
   if (X_ENABLE_READ == X_ENABLE_ON || Y_ENABLE_READ == Y_ENABLE_ON || Z_ENABLE_READ == Z_ENABLE_ON
54 55
     #if HAS_HEATED_BED
55 56
       || thermalManager.soft_pwm_amount_bed > 0
56 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 68
       #if E_STEPPERS > 1
59 69
         || E1_ENABLE_READ == E_ENABLE_ON
60
-        #if HAS_X2_ENABLE
61
-          || X2_ENABLE_READ == X_ENABLE_ON
62
-        #endif
63 70
         #if E_STEPPERS > 2
64 71
             || E2_ENABLE_READ == E_ENABLE_ON
65 72
           #if E_STEPPERS > 3
66 73
               || E3_ENABLE_READ == E_ENABLE_ON
74
+            #if E_STEPPERS > 4
75
+                || E4_ENABLE_READ == E_ENABLE_ON
76
+            #endif
67 77
           #endif
68 78
         #endif
69 79
       #endif

Loading…
Cancel
Save