Browse Source

Use ENABLED with DISABLE_[INACTIVE_][XYZ]

Scott Lahteine 8 years ago
parent
commit
4b648793f2
2 changed files with 21 additions and 13 deletions
  1. 4
    4
      Marlin/Marlin_main.cpp
  2. 17
    9
      Marlin/planner.cpp

+ 4
- 4
Marlin/Marlin_main.cpp View File

6999
 
6999
 
7000
   if (stepper_inactive_time && ms > previous_cmd_ms + stepper_inactive_time
7000
   if (stepper_inactive_time && ms > previous_cmd_ms + stepper_inactive_time
7001
       && !ignore_stepper_queue && !blocks_queued()) {
7001
       && !ignore_stepper_queue && !blocks_queued()) {
7002
-    #if DISABLE_INACTIVE_X == true
7002
+    #if ENABLED(DISABLE_INACTIVE_X)
7003
       disable_x();
7003
       disable_x();
7004
     #endif
7004
     #endif
7005
-    #if DISABLE_INACTIVE_Y == true
7005
+    #if ENABLED(DISABLE_INACTIVE_Y)
7006
       disable_y();
7006
       disable_y();
7007
     #endif
7007
     #endif
7008
-    #if DISABLE_INACTIVE_Z == true
7008
+    #if ENABLED(DISABLE_INACTIVE_Z)
7009
       disable_z();
7009
       disable_z();
7010
     #endif
7010
     #endif
7011
-    #if DISABLE_INACTIVE_E == true
7011
+    #if ENABLED(DISABLE_INACTIVE_E)
7012
       disable_e0();
7012
       disable_e0();
7013
       disable_e1();
7013
       disable_e1();
7014
       disable_e2();
7014
       disable_e2();

+ 17
- 9
Marlin/planner.cpp View File

421
       block_index = next_block_index(block_index);
421
       block_index = next_block_index(block_index);
422
     }
422
     }
423
   }
423
   }
424
-  if (DISABLE_X && !axis_active[X_AXIS]) disable_x();
425
-  if (DISABLE_Y && !axis_active[Y_AXIS]) disable_y();
426
-  if (DISABLE_Z && !axis_active[Z_AXIS]) disable_z();
427
-  if (DISABLE_E && !axis_active[E_AXIS]) {
428
-    disable_e0();
429
-    disable_e1();
430
-    disable_e2();
431
-    disable_e3();
432
-  }
424
+  #if ENABLED(DISABLE_X)
425
+    if (!axis_active[X_AXIS]) disable_x();
426
+  #endif
427
+  #if ENABLED(DISABLE_Y)
428
+    if (!axis_active[Y_AXIS]) disable_y();
429
+  #endif
430
+  #if ENABLED(DISABLE_Z)
431
+    if (!axis_active[Z_AXIS]) disable_z();
432
+  #endif
433
+  #if ENABLED(DISABLE_E)
434
+    if (!axis_active[E_AXIS]) {
435
+      disable_e0();
436
+      disable_e1();
437
+      disable_e2();
438
+      disable_e3();
439
+    }
440
+  #endif
433
 
441
 
434
   #if HAS_FAN
442
   #if HAS_FAN
435
     #ifdef FAN_KICKSTART_TIME
443
     #ifdef FAN_KICKSTART_TIME

Loading…
Cancel
Save