Browse Source

Apply shorthand option macros

Scott Lahteine 4 years ago
parent
commit
4078f2672e

+ 2
- 2
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/advanced_settings_menu.cpp View File

@@ -70,7 +70,7 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) {
70 70
       .enabled(0)
71 71
       #endif
72 72
       .tag(4) .button( BTN_POS(1,2), BTN_SIZE(1,1), F("Nozzle Offset"))
73
-      #if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR)
73
+      #if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
74 74
       .enabled(1)
75 75
       #else
76 76
       .enabled(0)
@@ -174,7 +174,7 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) {
174 174
     #endif
175 175
     case 9:  GOTO_SCREEN(InterfaceSettingsScreen);  LockScreen::check_passcode(); break;
176 176
     case 10: GOTO_SCREEN(RestoreFailsafeDialogBox); LockScreen::check_passcode(); break;
177
-    #if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR)
177
+    #if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
178 178
     case 11: GOTO_SCREEN(FilamentMenu); break;
179 179
     #endif
180 180
     case 12: GOTO_SCREEN(EndstopStatesScreen); break;

+ 1
- 1
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/backlash_compensation_screen.cpp View File

@@ -22,7 +22,7 @@
22 22
 
23 23
 #include "../config.h"
24 24
 
25
-#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(BACKLASH_GCODE)
25
+#if BOTH(LULZBOT_TOUCH_UI, BACKLASH_GCODE)
26 26
 
27 27
 #include "screens.h"
28 28
 

+ 1
- 1
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/confirm_auto_calibration_dialog_box.cpp View File

@@ -22,7 +22,7 @@
22 22
 
23 23
 #include "../config.h"
24 24
 
25
-#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(CALIBRATION_GCODE)
25
+#if BOTH(LULZBOT_TOUCH_UI, CALIBRATION_GCODE)
26 26
 
27 27
 #include "screens.h"
28 28
 

+ 1
- 1
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/confirm_erase_flash_dialog_box.cpp View File

@@ -22,7 +22,7 @@
22 22
 
23 23
 #include "../config.h"
24 24
 
25
-#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(DEVELOPER_SCREENS)
25
+#if BOTH(LULZBOT_TOUCH_UI, DEVELOPER_SCREENS)
26 26
 
27 27
 #include "screens.h"
28 28
 

+ 1
- 1
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/developer_menu.cpp View File

@@ -22,7 +22,7 @@
22 22
 
23 23
 #include "../config.h"
24 24
 
25
-#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(DEVELOPER_SCREENS)
25
+#if BOTH(LULZBOT_TOUCH_UI, DEVELOPER_SCREENS)
26 26
 
27 27
 #include "screens.h"
28 28
 

+ 1
- 1
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/filament_runout_screen.cpp View File

@@ -22,7 +22,7 @@
22 22
 
23 23
 #include "../config.h"
24 24
 
25
-#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(FILAMENT_RUNOUT_SENSOR)
25
+#if BOTH(LULZBOT_TOUCH_UI, FILAMENT_RUNOUT_SENSOR)
26 26
 
27 27
 #include "screens.h"
28 28
 

+ 1
- 1
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/junction_deviation_screen.cpp View File

@@ -22,7 +22,7 @@
22 22
 
23 23
 #include "../config.h"
24 24
 
25
-#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(JUNCTION_DEVIATION)
25
+#if BOTH(LULZBOT_TOUCH_UI, JUNCTION_DEVIATION)
26 26
 
27 27
 #include "screens.h"
28 28
 

+ 1
- 1
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/linear_advance_screen.cpp View File

@@ -22,7 +22,7 @@
22 22
 
23 23
 #include "../config.h"
24 24
 
25
-#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(LIN_ADVANCE)
25
+#if BOTH(LULZBOT_TOUCH_UI, LIN_ADVANCE)
26 26
 
27 27
 #include "screens.h"
28 28
 

+ 1
- 1
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/nudge_nozzle_screen.cpp View File

@@ -22,7 +22,7 @@
22 22
 
23 23
 #include "../config.h"
24 24
 
25
-#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(BABYSTEPPING)
25
+#if BOTH(LULZBOT_TOUCH_UI, BABYSTEPPING)
26 26
 
27 27
 #include "screens.h"
28 28
 #include "screen_data.h"

+ 1
- 1
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/screens.cpp View File

@@ -76,7 +76,7 @@ SCREEN_TABLE {
76 76
 #else
77 77
   DECL_SCREEN(JerkScreen),
78 78
 #endif
79
-#if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR)
79
+#if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
80 80
   DECL_SCREEN(FilamentMenu),
81 81
 #endif
82 82
 #if ENABLED(FILAMENT_RUNOUT_SENSOR)

+ 2
- 2
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/screens.h View File

@@ -60,7 +60,7 @@ enum {
60 60
 #else
61 61
   JERK_SCREEN_CACHE,
62 62
 #endif
63
-#if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR)
63
+#if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
64 64
   FILAMENT_MENU_CACHE,
65 65
 #endif
66 66
 #if ENABLED(LIN_ADVANCE)
@@ -490,7 +490,7 @@ class DefaultAccelerationScreen : public BaseNumericAdjustmentScreen, public Cac
490 490
   };
491 491
 #endif
492 492
 
493
-#if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR)
493
+#if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
494 494
   class FilamentMenu : public BaseNumericAdjustmentScreen, public CachedScreen<FILAMENT_MENU_CACHE> {
495 495
     public:
496 496
       static void onRedraw(draw_mode_t);

+ 1
- 1
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/statistics_screen.cpp View File

@@ -22,7 +22,7 @@
22 22
 
23 23
 #include "../config.h"
24 24
 
25
-#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(PRINTCOUNTER)
25
+#if BOTH(LULZBOT_TOUCH_UI, PRINTCOUNTER)
26 26
 
27 27
 #include "screens.h"
28 28
 

+ 1
- 1
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/stress_test_screen.cpp View File

@@ -22,7 +22,7 @@
22 22
 
23 23
 #include "../config.h"
24 24
 
25
-#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(DEVELOPER_SCREENS)
25
+#if BOTH(LULZBOT_TOUCH_UI, DEVELOPER_SCREENS)
26 26
 
27 27
 #include "screens.h"
28 28
 #include "screen_data.h"

+ 1
- 1
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/touch_registers_screen.cpp View File

@@ -22,7 +22,7 @@
22 22
 
23 23
 #include "../config.h"
24 24
 
25
-#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(DEVELOPER_SCREENS)
25
+#if BOTH(LULZBOT_TOUCH_UI, DEVELOPER_SCREENS)
26 26
 
27 27
 #include "screens.h"
28 28
 

+ 5
- 7
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/tune_menu.cpp View File

@@ -54,7 +54,7 @@ void TuneMenu::onRedraw(draw_mode_t what) {
54 54
     #ifdef TOUCH_UI_PORTRAIT
55 55
        .tag(2).enabled(1)      .button( BTN_POS(1,1), BTN_SIZE(2,1), F("Temperature"))
56 56
        .tag(3).enabled(!isPrinting()).button( BTN_POS(1,2), BTN_SIZE(2,1), F("Change Filament"))
57
-       #if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR)
57
+        #if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
58 58
           .enabled(1)
59 59
         #else
60 60
           .enabled(0)
@@ -118,7 +118,7 @@ void TuneMenu::onRedraw(draw_mode_t what) {
118 118
         .enabled(0)
119 119
       #endif
120 120
        .tag(8).           button( BTN_POS(2,3), BTN_SIZE(1,1), F("Cancel Print"))
121
-       #if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR)
121
+        #if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
122 122
           .enabled(1)
123 123
         #else
124 124
           .enabled(0)
@@ -141,10 +141,8 @@ bool TuneMenu::onTouchEnd(uint8_t tag) {
141 141
     case 4:
142 142
       #if ENABLED(BABYSTEPPING)
143 143
         GOTO_SCREEN(NudgeNozzleScreen);
144
-      #else
145
-        #if HAS_BED_PROBE
146
-          GOTO_SCREEN(ZOffsetScreen);
147
-        #endif
144
+      #elif HAS_BED_PROBE
145
+        GOTO_SCREEN(ZOffsetScreen);
148 146
       #endif
149 147
       break;
150 148
     case 5:  GOTO_SCREEN(FeedratePercentScreen);     break;
@@ -155,7 +153,7 @@ bool TuneMenu::onTouchEnd(uint8_t tag) {
155 153
       current_screen.forget();
156 154
       PUSH_SCREEN(StatusScreen);
157 155
       break;
158
-    #if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR)
156
+    #if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
159 157
     case 9:  GOTO_SCREEN(FilamentMenu); break;
160 158
     #endif
161 159
     default:

+ 1
- 1
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/widget_demo_screen.cpp View File

@@ -22,7 +22,7 @@
22 22
 
23 23
 #include "../config.h"
24 24
 
25
-#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(DEVELOPER_SCREENS)
25
+#if BOTH(LULZBOT_TOUCH_UI, DEVELOPER_SCREENS)
26 26
 
27 27
 #include "screens.h"
28 28
 

+ 1
- 1
Marlin/src/pins/stm32/pins_FYSETC_CHEETAH.h View File

@@ -118,7 +118,7 @@
118 118
     //#define LCD_SCREEN_ROT_180
119 119
     //#define LCD_SCREEN_ROT_270
120 120
 
121
-    #if ENABLED(FYSETC_MINI_12864) || ENABLED(U8GLIB_ST7920)
121
+    #if EITHER(FYSETC_MINI_12864, U8GLIB_ST7920)
122 122
       #define FORCE_SOFT_SPI
123 123
     #endif
124 124
   #endif

+ 14
- 14
config/examples/Formbot/Raptor/Configuration.h View File

@@ -82,11 +82,11 @@
82 82
  * If a UART connection is used to configure the driver, please select that as well in Configuration_adv.h.
83 83
  */
84 84
 //#define X_2208
85
-//#define X_SpreadCycle
85
+//#define X_SPREADCYCLE
86 86
 //#define Y_2208
87
-//#define Y_SpreadCycle
87
+//#define Y_SPREADCYCLE
88 88
 //#define E_2208
89
-//#define E_SpreadCycle
89
+//#define E_SPREADCYCLE
90 90
 
91 91
 
92 92
 /**
@@ -788,25 +788,25 @@
788 788
  *                                      X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]]
789 789
  */
790 790
 #if ENABLED(X_2208)
791
-  #if ENABLED(X_SpreadCycle)
792
-    #define x_accel 1750
791
+  #if ENABLED(X_SPREADCYCLE)
792
+    #define X_ACCEL 1750
793 793
   #else
794
-    #define x_accel 1000
794
+    #define X_ACCEL 1000
795 795
   #endif
796 796
 #else
797
-    #define x_accel 1500
797
+    #define X_ACCEL 1500
798 798
 #endif
799 799
 
800 800
 #if ENABLED(Y_2208)
801
-  #if ENABLED(Y_SpreadCycle)
802
-    #define y_accel 500
801
+  #if ENABLED(Y_SPREADCYCLE)
802
+    #define Y_ACCEL 500
803 803
   #else
804
-    #define y_accel 300
804
+    #define Y_ACCEL 300
805 805
   #endif
806 806
 #else
807
-  #define y_accel 500
807
+  #define Y_ACCEL 500
808 808
 #endif
809
-#define DEFAULT_MAX_ACCELERATION      { x_accel, y_accel, 400, 4000 }
809
+#define DEFAULT_MAX_ACCELERATION      { X_ACCEL, Y_ACCEL, 400, 4000 }
810 810
 
811 811
 /**
812 812
  * Default Acceleration (change/s) change = mm/s
@@ -843,12 +843,12 @@
843 843
  * value set here, it may happen instantaneously.
844 844
  */
845 845
 #if DISABLED(JUNCTION_DEVIATION)
846
-  #if ENABLED(X_SpreadCycle) || DISABLED(X_2208)
846
+  #if ENABLED(X_SPREADCYCLE) || DISABLED(X_2208)
847 847
     #define DEFAULT_XJERK 20.0
848 848
   #else
849 849
     #define DEFAULT_XJERK 10.0
850 850
   #endif
851
-  #if ENABLED(Y_SpreadCycle) || DISABLED(Y_2208)
851
+  #if ENABLED(Y_SPREADCYCLE) || DISABLED(Y_2208)
852 852
     #define DEFAULT_YJERK 10.0
853 853
   #else
854 854
     #define DEFAULT_YJERK  5.0

Loading…
Cancel
Save