Browse Source

Apply remaining ENABLED/DISABLED conditionals

Scott Lahteine 8 years ago
parent
commit
46453905d6

+ 1
- 1
Marlin/Conditionals.h View File

@@ -75,7 +75,7 @@
75 75
     #define NEWPANEL
76 76
   #endif
77 77
 
78
-  #ifdef MINIPANEL
78
+  #if ENABLED(MINIPANEL)
79 79
    #define DOGLCD
80 80
    #define SDSUPPORT
81 81
    #define ULTIPANEL

+ 3
- 3
Marlin/M100_Free_Mem_Chk.cpp View File

@@ -23,7 +23,7 @@
23 23
 
24 24
 #include "Marlin.h"
25 25
 
26
-#ifdef M100_FREE_MEMORY_WATCHER
26
+#if ENABLED(M100_FREE_MEMORY_WATCHER)
27 27
 extern void *__brkval;
28 28
 extern size_t  __heap_start, __heap_end, __flp;
29 29
 
@@ -73,7 +73,7 @@ int i, j, n;
73 73
 // the right hand column to help spotting them.
74 74
 //
75 75
 
76
-#ifdef M100_FREE_MEMORY_DUMPER			// Comment out to remove Dump sub-command
76
+#if ENABLED(M100_FREE_MEMORY_DUMPER) // Disable to remove Dump sub-command
77 77
 	if ( code_seen('D') ) {
78 78
  		ptr = (unsigned char *) __brkval;
79 79
 
@@ -163,7 +163,7 @@ int i, j, n;
163 163
 // M100 C x  Corrupts x locations in the free memory pool and reports the locations of the corruption.
164 164
 // This is useful to check the correctness of the M100 D and the M100 F commands.
165 165
 //
166
-#ifdef M100_FREE_MEMORY_CORRUPTOR
166
+#if ENABLED(M100_FREE_MEMORY_CORRUPTOR)
167 167
 	if ( code_seen('C') ) {
168 168
 		int x;			// x gets the # of locations to corrupt within the memory pool
169 169
 		x = code_value();

+ 7
- 7
Marlin/Marlin_main.cpp View File

@@ -4900,7 +4900,7 @@ inline void gcode_M503() {
4900 4900
     LCD_ALERTMESSAGEPGM(MSG_FILAMENTCHANGE);
4901 4901
     millis_t next_tick = 0;
4902 4902
     while (!lcd_clicked()) {
4903
-      #ifndef AUTO_FILAMENT_CHANGE
4903
+      #if DISABLED(AUTO_FILAMENT_CHANGE)
4904 4904
         millis_t ms = millis();
4905 4905
         if (ms >= next_tick) {
4906 4906
           lcd_quick_feedback();
@@ -4918,7 +4918,7 @@ inline void gcode_M503() {
4918 4918
     } // while(!lcd_clicked)
4919 4919
     lcd_quick_feedback(); // click sound feedback
4920 4920
 
4921
-    #ifdef AUTO_FILAMENT_CHANGE
4921
+    #if ENABLED(AUTO_FILAMENT_CHANGE)
4922 4922
       current_position[E_AXIS] = 0;
4923 4923
       st_synchronize();
4924 4924
     #endif
@@ -5377,7 +5377,7 @@ void process_next_command() {
5377 5377
           break;
5378 5378
       #endif // ENABLE_AUTO_BED_LEVELING && Z_PROBE_REPEATABILITY_TEST
5379 5379
 
5380
-      #ifdef M100_FREE_MEMORY_WATCHER
5380
+      #if ENABLED(M100_FREE_MEMORY_WATCHER)
5381 5381
         case 100:
5382 5382
           gcode_M100();
5383 5383
           break;
@@ -6228,9 +6228,9 @@ void plan_arc(
6228 6228
 
6229 6229
     clamp_to_software_endstops(arc_target);
6230 6230
 
6231
-    #if defined(DELTA) || defined(SCARA)
6231
+    #if ENABLED(DELTA) || ENABLED(SCARA)
6232 6232
       calculate_delta(arc_target);
6233
-      #ifdef ENABLE_AUTO_BED_LEVELING
6233
+      #if ENABLED(ENABLE_AUTO_BED_LEVELING)
6234 6234
         adjust_delta(arc_target);
6235 6235
       #endif
6236 6236
       plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], arc_target[E_AXIS], feed_rate, active_extruder);
@@ -6240,9 +6240,9 @@ void plan_arc(
6240 6240
   }
6241 6241
 
6242 6242
   // Ensure last segment arrives at target location.
6243
-  #if defined(DELTA) || defined(SCARA)
6243
+  #if ENABLED(DELTA) || ENABLED(SCARA)
6244 6244
     calculate_delta(target);
6245
-    #ifdef ENABLE_AUTO_BED_LEVELING
6245
+    #if ENABLED(ENABLE_AUTO_BED_LEVELING)
6246 6246
       adjust_delta(target);
6247 6247
     #endif
6248 6248
     plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], target[E_AXIS], feed_rate, active_extruder);

+ 1
- 1
Marlin/buzzer.cpp View File

@@ -9,7 +9,7 @@
9 9
         lcd_buzz(duration, freq);
10 10
       #elif PIN_EXISTS(BEEPER) // on-board buzzers have no further condition
11 11
         SET_OUTPUT(BEEPER_PIN);
12
-        #ifdef SPEAKER // a speaker needs a AC ore a pulsed DC
12
+        #if ENABLED(SPEAKER) // a speaker needs a AC ore a pulsed DC
13 13
           //tone(BEEPER_PIN, freq, duration); // needs a PWMable pin
14 14
           unsigned int delay = 1000000 / freq / 2;
15 15
           int i = duration * freq / 1000;

+ 3
- 3
Marlin/dogm_lcd_implementation.h View File

@@ -125,10 +125,10 @@
125 125
 #elif ENABLED(U8GLIB_LM6059_AF)
126 126
   // Based on the Adafruit ST7565 (http://www.adafruit.com/products/250)
127 127
   U8GLIB_LM6059 u8g(DOGLCD_CS, DOGLCD_A0);
128
-#elif defined U8GLIB_SSD1306
128
+#elif ENABLED(U8GLIB_SSD1306)
129 129
   // Generic support for SSD1306 OLED I2C LCDs
130 130
   U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE);
131
-#elif defined(MINIPANEL)
131
+#elif ENABLED(MINIPANEL)
132 132
   // The MINIPanel display
133 133
   U8GLIB_MINI12864 u8g(DOGLCD_CS, DOGLCD_A0);
134 134
 #else
@@ -206,7 +206,7 @@ static void lcd_implementation_init() {
206 206
     pinMode(LCD_PIN_RESET, OUTPUT);           
207 207
     digitalWrite(LCD_PIN_RESET, HIGH);
208 208
   #endif
209
-  #ifndef MINIPANEL//setContrast not working for Mini Panel
209
+  #if DISABLED(MINIPANEL) // setContrast not working for Mini Panel
210 210
     u8g.setContrast(lcd_contrast);	
211 211
   #endif
212 212
   // FIXME: remove this workaround

+ 1
- 1
Marlin/example_configurations/Felix/Configuration.h View File

@@ -301,7 +301,7 @@ Here are some standard links for getting your machine calibrated:
301 301
 // coarse Endstop Settings
302 302
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
303 303
 
304
-#ifndef ENDSTOPPULLUPS
304
+#if DISABLED(ENDSTOPPULLUPS)
305 305
   // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
306 306
   // #define ENDSTOPPULLUP_XMAX
307 307
   // #define ENDSTOPPULLUP_YMAX

+ 2
- 2
Marlin/example_configurations/Felix/Configuration_DUAL.h View File

@@ -286,7 +286,7 @@ Here are some standard links for getting your machine calibrated:
286 286
 // coarse Endstop Settings
287 287
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
288 288
 
289
-#ifndef ENDSTOPPULLUPS
289
+#if DISABLED(ENDSTOPPULLUPS)
290 290
   // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
291 291
   // #define ENDSTOPPULLUP_XMAX
292 292
   // #define ENDSTOPPULLUP_YMAX
@@ -727,7 +727,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
727 727
 // With this option servos are powered only during movement, then turned off to prevent jitter.
728 728
 //#define DEACTIVATE_SERVOS_AFTER_MOVE
729 729
 
730
-#ifdef DEACTIVATE_SERVOS_AFTER_MOVE
730
+#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
731 731
   // Delay (in microseconds) before turning the servo off. This depends on the servo speed.
732 732
   // 300ms is a good value but you can try less delay.
733 733
   // If the servo can't reach the requested position, increase it.

+ 1
- 1
Marlin/example_configurations/Hephestos/Configuration.h View File

@@ -311,7 +311,7 @@ Here are some standard links for getting your machine calibrated:
311 311
 // coarse Endstop Settings
312 312
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
313 313
 
314
-#ifndef ENDSTOPPULLUPS
314
+#if DISABLED(ENDSTOPPULLUPS)
315 315
   // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
316 316
   // #define ENDSTOPPULLUP_XMAX
317 317
   // #define ENDSTOPPULLUP_YMAX

+ 1
- 1
Marlin/example_configurations/K8200/Configuration.h View File

@@ -307,7 +307,7 @@ Here are some standard links for getting your machine calibrated:
307 307
 // coarse Endstop Settings
308 308
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
309 309
 
310
-#ifndef ENDSTOPPULLUPS
310
+#if DISABLED(ENDSTOPPULLUPS)
311 311
   // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
312 312
   // #define ENDSTOPPULLUP_XMAX
313 313
   // #define ENDSTOPPULLUP_YMAX

+ 1
- 1
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h View File

@@ -319,7 +319,7 @@ Here are some standard links for getting your machine calibrated:
319 319
 // coarse Endstop Settings
320 320
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
321 321
 
322
-#ifndef ENDSTOPPULLUPS
322
+#if DISABLED(ENDSTOPPULLUPS)
323 323
   // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
324 324
   // #define ENDSTOPPULLUP_XMAX
325 325
   // #define ENDSTOPPULLUP_YMAX

+ 1
- 1
Marlin/example_configurations/SCARA/Configuration.h View File

@@ -327,7 +327,7 @@ Here are some standard links for getting your machine calibrated:
327 327
 // coarse Endstop Settings
328 328
 //#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
329 329
 
330
-#ifndef ENDSTOPPULLUPS
330
+#if DISABLED(ENDSTOPPULLUPS)
331 331
   // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
332 332
   // #define ENDSTOPPULLUP_XMAX
333 333
   // #define ENDSTOPPULLUP_YMAX

+ 1
- 1
Marlin/example_configurations/WITBOX/Configuration.h View File

@@ -311,7 +311,7 @@ Here are some standard links for getting your machine calibrated:
311 311
 // coarse Endstop Settings
312 312
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
313 313
 
314
-#ifndef ENDSTOPPULLUPS
314
+#if DISABLED(ENDSTOPPULLUPS)
315 315
   // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
316 316
   // #define ENDSTOPPULLUP_XMAX
317 317
   // #define ENDSTOPPULLUP_YMAX

+ 1
- 1
Marlin/example_configurations/adafruit/ST7565/Configuration.h View File

@@ -319,7 +319,7 @@ Here are some standard links for getting your machine calibrated:
319 319
 // coarse Endstop Settings
320 320
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
321 321
 
322
-#ifndef ENDSTOPPULLUPS
322
+#if DISABLED(ENDSTOPPULLUPS)
323 323
   // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
324 324
   // #define ENDSTOPPULLUP_XMAX
325 325
   // #define ENDSTOPPULLUP_YMAX

+ 1
- 1
Marlin/example_configurations/delta/biv2.5/Configuration.h View File

@@ -354,7 +354,7 @@ Here are some standard links for getting your machine calibrated:
354 354
 // coarse Endstop Settings
355 355
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
356 356
 
357
-#ifndef ENDSTOPPULLUPS
357
+#if DISABLED(ENDSTOPPULLUPS)
358 358
   // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
359 359
   // #define ENDSTOPPULLUP_XMAX
360 360
   // #define ENDSTOPPULLUP_YMAX

+ 1
- 1
Marlin/example_configurations/delta/generic/Configuration.h View File

@@ -354,7 +354,7 @@ Here are some standard links for getting your machine calibrated:
354 354
 // coarse Endstop Settings
355 355
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
356 356
 
357
-#ifndef ENDSTOPPULLUPS
357
+#if DISABLED(ENDSTOPPULLUPS)
358 358
   // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
359 359
   // #define ENDSTOPPULLUP_XMAX
360 360
   // #define ENDSTOPPULLUP_YMAX

+ 1
- 1
Marlin/example_configurations/delta/kossel_mini/Configuration.h View File

@@ -354,7 +354,7 @@ Here are some standard links for getting your machine calibrated:
354 354
 // coarse Endstop Settings
355 355
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
356 356
 
357
-#ifndef ENDSTOPPULLUPS
357
+#if DISABLED(ENDSTOPPULLUPS)
358 358
   // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
359 359
   // #define ENDSTOPPULLUP_XMAX
360 360
   // #define ENDSTOPPULLUP_YMAX

+ 1
- 1
Marlin/example_configurations/delta/kossel_pro/Configuration.h View File

@@ -341,7 +341,7 @@ Here are some standard links for getting your machine calibrated:
341 341
 // coarse Endstop Settings
342 342
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
343 343
 
344
-#ifndef ENDSTOPPULLUPS
344
+#if DISABLED(ENDSTOPPULLUPS)
345 345
   // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
346 346
   // #define ENDSTOPPULLUP_XMAX
347 347
   // #define ENDSTOPPULLUP_YMAX

+ 1
- 1
Marlin/example_configurations/makibox/Configuration.h View File

@@ -322,7 +322,7 @@ Here are some standard links for getting your machine calibrated:
322 322
 // coarse Endstop Settings
323 323
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
324 324
 
325
-#ifndef ENDSTOPPULLUPS
325
+#if DISABLED(ENDSTOPPULLUPS)
326 326
   // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
327 327
   // #define ENDSTOPPULLUP_XMAX
328 328
   // #define ENDSTOPPULLUP_YMAX

+ 1
- 1
Marlin/example_configurations/tvrrug/Round2/Configuration.h View File

@@ -309,7 +309,7 @@ Here are some standard links for getting your machine calibrated:
309 309
 // coarse Endstop Settings
310 310
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
311 311
 
312
-#ifndef ENDSTOPPULLUPS
312
+#if DISABLED(ENDSTOPPULLUPS)
313 313
   // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
314 314
   // #define ENDSTOPPULLUP_XMAX
315 315
   // #define ENDSTOPPULLUP_YMAX

+ 1
- 1
Marlin/pins_MEGACONTROLLER.h View File

@@ -80,7 +80,7 @@
80 80
   #define TEMP_BED_PIN 1 // ANALOG NUMBERING
81 81
 #endif
82 82
 
83
-#ifdef MINIPANEL
83
+#if ENABLED(MINIPANEL)
84 84
     #define BEEPER_PIN 46
85 85
     // Pins for DOGM SPI LCD Support
86 86
     #define DOGLCD_A0  47

+ 1
- 1
Marlin/pins_MEGATRONICS.h View File

@@ -60,7 +60,7 @@
60 60
 
61 61
 #define BEEPER_PIN         33   // AUX-4
62 62
 
63
-#if defined(ULTRA_LCD) && defined(NEWPANEL)
63
+#if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
64 64
 
65 65
   #define LCD_PINS_RS     16
66 66
   #define LCD_PINS_ENABLE 17

+ 1
- 1
Marlin/pins_PRINTRBOARD.h View File

@@ -45,7 +45,7 @@
45 45
 #endif
46 46
 
47 47
 #define X_STOP_PIN         35
48
-#ifdef SDSUPPORT
48
+#if ENABLED(SDSUPPORT)
49 49
   #define Y_STOP_PIN       37 // Move Ystop to Estop socket
50 50
 #else
51 51
   #define Y_STOP_PIN        8 // Ystop in Ystop socket

+ 1
- 1
Marlin/pins_RAMPS_13.h View File

@@ -182,7 +182,7 @@
182 182
       #define DOGLCD_CS 29
183 183
       #define DOGLCD_A0 27
184 184
       #define LCD_PIN_BL 33
185
-    #elif defined(MINIPANEL)
185
+    #elif ENABLED(MINIPANEL)
186 186
        #define BEEPER_PIN 42
187 187
        // Pins for DOGM SPI LCD Support
188 188
        #define DOGLCD_A0  44

+ 4
- 4
Marlin/pins_RIGIDBOARD.h View File

@@ -46,7 +46,7 @@
46 46
   #undef  SD_DETECT_PIN
47 47
   #define SD_DETECT_PIN 22
48 48
 
49
-#elif defined(REPRAP_DISCOUNT_SMART_CONTROLLER)
49
+#elif ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
50 50
 
51 51
   #undef BEEPER_PIN
52 52
   #define BEEPER_PIN -1
@@ -61,10 +61,10 @@
61 61
 
62 62
 // SPI for Max6675 Thermocouple
63 63
 #undef MAX6675_SS
64
-#ifndef SDSUPPORT
65
-  #define MAX6675_SS       53 // Don't use pin 53 if there is even the remote possibility of using Display/SD card
66
-#else
64
+#if ENABLED(SDSUPPORT)
67 65
   #define MAX6675_SS       49 // Don't use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
66
+#else
67
+  #define MAX6675_SS       53 // Don't use pin 53 if there is even the remote possibility of using Display/SD card
68 68
 #endif
69 69
 
70 70
 // RigidBot swaps E0 / E1 plugs vs RAMPS 1.3

+ 6
- 6
Marlin/planner.cpp View File

@@ -542,7 +542,7 @@ float junction_deviation = 0.1;
542 542
     block->steps[A_AXIS] = labs(dx + dy);
543 543
     block->steps[B_AXIS] = labs(dx - dy);
544 544
     block->steps[Z_AXIS] = labs(dz);
545
-  #elif defined(COREXZ)
545
+  #elif ENABLED(COREXZ)
546 546
     // corexz planning
547 547
     block->steps[A_AXIS] = labs(dx + dz);
548 548
     block->steps[Y_AXIS] = labs(dy);
@@ -577,7 +577,7 @@ float junction_deviation = 0.1;
577 577
     if (dz < 0) db |= BIT(Z_AXIS);
578 578
     if (dx + dy < 0) db |= BIT(A_AXIS); // Motor A direction
579 579
     if (dx - dy < 0) db |= BIT(B_AXIS); // Motor B direction
580
-  #elif defined(COREXZ)
580
+  #elif ENABLED(COREXZ)
581 581
     if (dx < 0) db |= BIT(X_HEAD); // Save the real Extruder (head) direction in X Axis
582 582
     if (dy < 0) db |= BIT(Y_AXIS);
583 583
     if (dz < 0) db |= BIT(Z_HEAD); // ...and Z
@@ -599,10 +599,10 @@ float junction_deviation = 0.1;
599 599
       enable_x();
600 600
       enable_y();
601 601
     }
602
-    #ifndef Z_LATE_ENABLE
602
+    #if DISABLED(Z_LATE_ENABLE)
603 603
       if (block->steps[Z_AXIS]) enable_z();
604 604
     #endif
605
-  #elif defined(COREXZ)
605
+  #elif ENABLED(COREXZ)
606 606
     if (block->steps[A_AXIS] || block->steps[C_AXIS]) {
607 607
       enable_x();
608 608
       enable_z();
@@ -611,7 +611,7 @@ float junction_deviation = 0.1;
611 611
   #else
612 612
     if (block->steps[X_AXIS]) enable_x();
613 613
     if (block->steps[Y_AXIS]) enable_y();
614
-    #ifndef Z_LATE_ENABLE
614
+    #if DISABLED(Z_LATE_ENABLE)
615 615
       if (block->steps[Z_AXIS]) enable_z();
616 616
     #endif
617 617
   #endif
@@ -700,7 +700,7 @@ float junction_deviation = 0.1;
700 700
     delta_mm[Z_AXIS] = dz / axis_steps_per_unit[Z_AXIS];
701 701
     delta_mm[A_AXIS] = (dx + dy) / axis_steps_per_unit[A_AXIS];
702 702
     delta_mm[B_AXIS] = (dx - dy) / axis_steps_per_unit[B_AXIS];
703
-  #elif defined(COREXZ)
703
+  #elif ENABLED(COREXZ)
704 704
     float delta_mm[6];
705 705
     delta_mm[X_HEAD] = dx / axis_steps_per_unit[A_AXIS];
706 706
     delta_mm[Y_AXIS] = dy / axis_steps_per_unit[Y_AXIS];

+ 1
- 1
Marlin/servo.cpp View File

@@ -307,7 +307,7 @@ bool Servo::attached() { return servo_info[this->servoIndex].Pin.isActive; }
307 307
 void Servo::move(int value) {
308 308
   if (this->attach(0) >= 0) {
309 309
     this->write(value);
310
-    #ifdef DEACTIVATE_SERVOS_AFTER_MOVE
310
+    #if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
311 311
       delay(SERVO_DEACTIVATION_DELAY);
312 312
       this->detach();
313 313
     #endif

+ 14
- 14
Marlin/stepper.cpp View File

@@ -289,7 +289,7 @@ void enable_endstops(bool check) { check_endstops = check; }
289 289
 // Check endstops
290 290
 inline void update_endstops() {
291 291
   
292
-  #ifdef Z_DUAL_ENDSTOPS
292
+  #if ENABLED(Z_DUAL_ENDSTOPS)
293 293
     uint16_t
294 294
   #else
295 295
     byte
@@ -317,12 +317,12 @@ inline void update_endstops() {
317 317
       step_events_completed = current_block->step_event_count; \
318 318
     }
319 319
   
320
-  #ifdef COREXY
320
+  #if ENABLED(COREXY)
321 321
     // Head direction in -X axis for CoreXY bots.
322 322
     // If DeltaX == -DeltaY, the movement is only in Y axis
323 323
     if ((current_block->steps[A_AXIS] != current_block->steps[B_AXIS]) || (TEST(out_bits, A_AXIS) == TEST(out_bits, B_AXIS))) {
324 324
       if (TEST(out_bits, X_HEAD))
325
-  #elif defined(COREXZ)
325
+  #elif ENABLED(COREXZ)
326 326
     // Head direction in -X axis for CoreXZ bots.
327 327
     // If DeltaX == -DeltaZ, the movement is only in Z axis
328 328
     if ((current_block->steps[A_AXIS] != current_block->steps[C_AXIS]) || (TEST(out_bits, A_AXIS) == TEST(out_bits, C_AXIS))) {
@@ -331,7 +331,7 @@ inline void update_endstops() {
331 331
       if (TEST(out_bits, X_AXIS))   // stepping along -X axis (regular Cartesian bot)
332 332
   #endif
333 333
       { // -direction
334
-        #ifdef DUAL_X_CARRIAGE
334
+        #if ENABLED(DUAL_X_CARRIAGE)
335 335
           // with 2 x-carriages, endstops are only checked in the homing direction for the active extruder
336 336
           if ((current_block->active_extruder == 0 && X_HOME_DIR == -1) || (current_block->active_extruder != 0 && X2_HOME_DIR == -1))
337 337
         #endif
@@ -342,7 +342,7 @@ inline void update_endstops() {
342 342
           }
343 343
       }
344 344
       else { // +direction
345
-        #ifdef DUAL_X_CARRIAGE
345
+        #if ENABLED(DUAL_X_CARRIAGE)
346 346
           // with 2 x-carriages, endstops are only checked in the homing direction for the active extruder
347 347
           if ((current_block->active_extruder == 0 && X_HOME_DIR == 1) || (current_block->active_extruder != 0 && X2_HOME_DIR == 1))
348 348
         #endif
@@ -352,11 +352,11 @@ inline void update_endstops() {
352 352
             #endif
353 353
           }
354 354
       }
355
-  #if defined(COREXY) || defined(COREXZ)
355
+  #if ENABLED(COREXY) || ENABLED(COREXZ)
356 356
     }
357 357
   #endif
358 358
 
359
-  #ifdef COREXY
359
+  #if ENABLED(COREXY)
360 360
     // Head direction in -Y axis for CoreXY bots.
361 361
     // If DeltaX == DeltaY, the movement is only in X axis
362 362
     if ((current_block->steps[A_AXIS] != current_block->steps[B_AXIS]) || (TEST(out_bits, A_AXIS) != TEST(out_bits, B_AXIS))) {
@@ -374,11 +374,11 @@ inline void update_endstops() {
374 374
           UPDATE_ENDSTOP(Y, MAX);
375 375
         #endif
376 376
       }
377
-  #if defined(COREXY)
377
+  #if ENABLED(COREXY)
378 378
     }
379 379
   #endif
380 380
 
381
-  #ifdef COREXZ
381
+  #if ENABLED(COREXZ)
382 382
     // Head direction in -Z axis for CoreXZ bots.
383 383
     // If DeltaX == DeltaZ, the movement is only in X axis
384 384
     if ((current_block->steps[A_AXIS] != current_block->steps[C_AXIS]) || (TEST(out_bits, A_AXIS) != TEST(out_bits, C_AXIS))) {
@@ -389,7 +389,7 @@ inline void update_endstops() {
389 389
       { // z -direction
390 390
         #if HAS_Z_MIN
391 391
 
392
-          #ifdef Z_DUAL_ENDSTOPS
392
+          #if ENABLED(Z_DUAL_ENDSTOPS)
393 393
             SET_ENDSTOP_BIT(Z, MIN);
394 394
               #if HAS_Z2_MIN
395 395
                 SET_ENDSTOP_BIT(Z2, MIN);
@@ -411,7 +411,7 @@ inline void update_endstops() {
411 411
           #endif // !Z_DUAL_ENDSTOPS
412 412
         #endif // Z_MIN_PIN
413 413
 
414
-        #ifdef Z_PROBE_ENDSTOP
414
+        #if ENABLED(Z_PROBE_ENDSTOP)
415 415
           UPDATE_ENDSTOP(Z, PROBE);
416 416
 
417 417
           if (TEST_ENDSTOP(Z_PROBE))
@@ -424,7 +424,7 @@ inline void update_endstops() {
424 424
       else { // z +direction
425 425
         #if HAS_Z_MAX
426 426
 
427
-          #ifdef Z_DUAL_ENDSTOPS
427
+          #if ENABLED(Z_DUAL_ENDSTOPS)
428 428
 
429 429
             SET_ENDSTOP_BIT(Z, MAX);
430 430
               #if HAS_Z2_MAX
@@ -449,7 +449,7 @@ inline void update_endstops() {
449 449
           #endif // !Z_DUAL_ENDSTOPS
450 450
         #endif // Z_MAX_PIN
451 451
         
452
-        #ifdef Z_PROBE_ENDSTOP
452
+        #if ENABLED(Z_PROBE_ENDSTOP)
453 453
           UPDATE_ENDSTOP(Z, PROBE);
454 454
           
455 455
           if (TEST_ENDSTOP(Z_PROBE))
@@ -459,7 +459,7 @@ inline void update_endstops() {
459 459
           }
460 460
         #endif
461 461
       }
462
-  #if defined(COREXZ)
462
+  #if ENABLED(COREXZ)
463 463
     }
464 464
   #endif  
465 465
   old_endstop_bits = current_endstop_bits;

+ 1
- 1
Marlin/ultralcd.cpp View File

@@ -275,7 +275,7 @@ static void lcd_status_screen() {
275 275
 
276 276
   #if ENABLED(LCD_PROGRESS_BAR)
277 277
     millis_t ms = millis();
278
-    #ifndef PROGRESS_MSG_ONCE
278
+    #if DISABLED(PROGRESS_MSG_ONCE)
279 279
       if (ms > progress_bar_ms + PROGRESS_BAR_MSG_TIME + PROGRESS_BAR_BAR_TIME) {
280 280
         progress_bar_ms = ms;
281 281
       }

+ 1
- 1
Marlin/ultralcd_implementation_hitachi_HD44780.h View File

@@ -6,7 +6,7 @@
6 6
 * When selecting the Russian language, a slightly different LCD implementation is used to handle UTF8 characters.
7 7
 **/
8 8
 
9
-//#ifndef REPRAPWORLD_KEYPAD
9
+//#if DISABLED(REPRAPWORLD_KEYPAD)
10 10
 //  extern volatile uint8_t buttons;  //the last checked buttons in a bit array.
11 11
 //#else
12 12
   extern volatile uint8_t buttons;  //an extended version of the last checked buttons in a bit array.

Loading…
Cancel
Save