Browse Source

🎨 Check flags without ENABLED

Scott Lahteine 2 years ago
parent
commit
26bfc26797

+ 2
- 2
Marlin/src/MarlinCore.cpp View File

@@ -135,7 +135,7 @@
135 135
   #include "module/servo.h"
136 136
 #endif
137 137
 
138
-#if ENABLED(HAS_MOTOR_CURRENT_DAC)
138
+#if HAS_MOTOR_CURRENT_DAC
139 139
   #include "feature/dac/stepper_dac.h"
140 140
 #endif
141 141
 
@@ -1355,7 +1355,7 @@ void setup() {
1355 1355
     SETUP_RUN(digipot_i2c.init());
1356 1356
   #endif
1357 1357
 
1358
-  #if ENABLED(HAS_MOTOR_CURRENT_DAC)
1358
+  #if HAS_MOTOR_CURRENT_DAC
1359 1359
     SETUP_RUN(stepper_dac.init());
1360 1360
   #endif
1361 1361
 

+ 1
- 1
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp View File

@@ -307,7 +307,7 @@ void unified_bed_leveling::G29() {
307 307
 
308 308
   const uint8_t p_val = parser.byteval('P');
309 309
   const bool may_move = p_val == 1 || p_val == 2 || p_val == 4 || parser.seen_test('J');
310
-  #if ENABLED(HAS_MULTI_HOTEND)
310
+  #if HAS_MULTI_HOTEND
311 311
     const uint8_t old_tool_index = active_extruder;
312 312
   #endif
313 313
 

+ 1
- 1
Marlin/src/feature/dac/dac_mcp4728.cpp View File

@@ -32,7 +32,7 @@
32 32
 
33 33
 #include "../../inc/MarlinConfig.h"
34 34
 
35
-#if ENABLED(HAS_MOTOR_CURRENT_DAC)
35
+#if HAS_MOTOR_CURRENT_DAC
36 36
 
37 37
 #include "dac_mcp4728.h"
38 38
 

+ 1
- 1
Marlin/src/feature/dac/stepper_dac.cpp View File

@@ -26,7 +26,7 @@
26 26
 
27 27
 #include "../../inc/MarlinConfig.h"
28 28
 
29
-#if ENABLED(HAS_MOTOR_CURRENT_DAC)
29
+#if HAS_MOTOR_CURRENT_DAC
30 30
 
31 31
 #include "stepper_dac.h"
32 32
 #include "../../MarlinCore.h" // for SP_X_LBL...

+ 3
- 3
Marlin/src/feature/joystick.h View File

@@ -32,13 +32,13 @@
32 32
 class Joystick {
33 33
   friend class Temperature;
34 34
   private:
35
-    #if ENABLED(HAS_JOY_ADC_X)
35
+    #if HAS_JOY_ADC_X
36 36
       static temp_info_t x;
37 37
     #endif
38
-    #if ENABLED(HAS_JOY_ADC_Y)
38
+    #if HAS_JOY_ADC_Y
39 39
       static temp_info_t y;
40 40
     #endif
41
-    #if ENABLED(HAS_JOY_ADC_Z)
41
+    #if HAS_JOY_ADC_Z
42 42
       static temp_info_t z;
43 43
     #endif
44 44
   public:

+ 6
- 6
Marlin/src/feature/powerloss.h View File

@@ -64,13 +64,13 @@ typedef struct {
64 64
     Repeat stored_repeat;
65 65
   #endif
66 66
 
67
-  #if ENABLED(HAS_HOME_OFFSET)
67
+  #if HAS_HOME_OFFSET
68 68
     xyz_pos_t home_offset;
69 69
   #endif
70
-  #if ENABLED(HAS_POSITION_SHIFT)
70
+  #if HAS_POSITION_SHIFT
71 71
     xyz_pos_t position_shift;
72 72
   #endif
73
-  #if ENABLED(HAS_MULTI_EXTRUDER)
73
+  #if HAS_MULTI_EXTRUDER
74 74
     uint8_t active_extruder;
75 75
   #endif
76 76
 
@@ -78,13 +78,13 @@ typedef struct {
78 78
     float filament_size[EXTRUDERS];
79 79
   #endif
80 80
 
81
-  #if ENABLED(HAS_HOTEND)
81
+  #if HAS_HOTEND
82 82
     celsius_t target_temperature[HOTENDS];
83 83
   #endif
84
-  #if ENABLED(HAS_HEATED_BED)
84
+  #if HAS_HEATED_BED
85 85
     celsius_t target_temperature_bed;
86 86
   #endif
87
-  #if ENABLED(HAS_FAN)
87
+  #if HAS_FAN
88 88
     uint8_t fan_speed[FAN_COUNT];
89 89
   #endif
90 90
 

+ 1
- 1
Marlin/src/feature/tmc_util.h View File

@@ -363,7 +363,7 @@ void test_tmc_connection(LOGICAL_AXIS_DECL(const bool, true));
363 363
 
364 364
     struct motion_state_t {
365 365
       xy_ulong_t acceleration;
366
-      #if ENABLED(HAS_CLASSIC_JERK)
366
+      #if HAS_CLASSIC_JERK
367 367
         xy_float_t jerk_state;
368 368
       #endif
369 369
     };

+ 1
- 1
Marlin/src/gcode/calibrate/G33.cpp View File

@@ -63,7 +63,7 @@ enum CalEnum : char {                        // the 7 main calibration points -
63 63
 #define LOOP_CAL_RAD(VAR) LOOP_CAL_PT(VAR, __A, _7P_STEP)
64 64
 #define LOOP_CAL_ACT(VAR, _4P, _OP) LOOP_CAL_PT(VAR, _OP ? _AB : __A, _4P ? _4P_STEP : _7P_STEP)
65 65
 
66
-#if ENABLED(HAS_MULTI_HOTEND)
66
+#if HAS_MULTI_HOTEND
67 67
   const uint8_t old_tool_index = active_extruder;
68 68
 #endif
69 69
 

+ 4
- 4
Marlin/src/gcode/calibrate/G34.cpp View File

@@ -81,11 +81,11 @@ void GcodeSuite::G34() {
81 81
     const uint16_t target_current = parser.intval('S', GANTRY_CALIBRATION_CURRENT);
82 82
     const uint32_t previous_current = stepper.motor_current_setting[Z_AXIS];
83 83
     stepper.set_digipot_current(1, target_current);
84
-  #elif ENABLED(HAS_MOTOR_CURRENT_DAC)
84
+  #elif HAS_MOTOR_CURRENT_DAC
85 85
     const float target_current = parser.floatval('S', GANTRY_CALIBRATION_CURRENT);
86 86
     const float previous_current = dac_amps(Z_AXIS, target_current);
87 87
     stepper_dac.set_current_value(Z_AXIS, target_current);
88
-  #elif ENABLED(HAS_MOTOR_CURRENT_I2C)
88
+  #elif HAS_MOTOR_CURRENT_I2C
89 89
     const uint16_t target_current = parser.intval('S', GANTRY_CALIBRATION_CURRENT);
90 90
     previous_current = dac_amps(Z_AXIS);
91 91
     digipot_i2c.set_current(Z_AXIS, target_current)
@@ -127,9 +127,9 @@ void GcodeSuite::G34() {
127 127
     stepper.set_digipot_current(Z_AXIS, previous_current);
128 128
   #elif HAS_MOTOR_CURRENT_PWM
129 129
     stepper.set_digipot_current(1, previous_current);
130
-  #elif ENABLED(HAS_MOTOR_CURRENT_DAC)
130
+  #elif HAS_MOTOR_CURRENT_DAC
131 131
     stepper_dac.set_current_value(Z_AXIS, previous_current);
132
-  #elif ENABLED(HAS_MOTOR_CURRENT_I2C)
132
+  #elif HAS_MOTOR_CURRENT_I2C
133 133
     digipot_i2c.set_current(Z_AXIS, previous_current)
134 134
   #elif HAS_TRINAMIC_CONFIG
135 135
     #if AXIS_IS_TMC(Z)

+ 3
- 3
Marlin/src/gcode/feature/digipot/M907-M910.cpp View File

@@ -34,7 +34,7 @@
34 34
   #include "../../../feature/digipot/digipot.h"
35 35
 #endif
36 36
 
37
-#if ENABLED(HAS_MOTOR_CURRENT_DAC)
37
+#if HAS_MOTOR_CURRENT_DAC
38 38
   #include "../../../feature/dac/stepper_dac.h"
39 39
 #endif
40 40
 
@@ -73,7 +73,7 @@ void GcodeSuite::M907() {
73 73
     #endif
74 74
   #endif
75 75
 
76
-  #if ENABLED(HAS_MOTOR_CURRENT_DAC)
76
+  #if HAS_MOTOR_CURRENT_DAC
77 77
     if (parser.seenval('S')) {
78 78
       const float dac_percent = parser.value_float();
79 79
       LOOP_LE_N(i, 4) stepper_dac.set_current_percent(i, dac_percent);
@@ -92,7 +92,7 @@ void GcodeSuite::M907() {
92 92
     TERN_(HAS_MOTOR_CURRENT_DAC, stepper_dac.set_current_value(parser.byteval('P', -1), parser.ushortval('S', 0)));
93 93
   }
94 94
 
95
-  #if ENABLED(HAS_MOTOR_CURRENT_DAC)
95
+  #if HAS_MOTOR_CURRENT_DAC
96 96
 
97 97
     void GcodeSuite::M909() { stepper_dac.print_values(); }
98 98
     void GcodeSuite::M910() { stepper_dac.commit_eeprom(); }

+ 1
- 1
Marlin/src/gcode/gcode.cpp View File

@@ -908,7 +908,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
908 908
         case 907: M907(); break;                                  // M907: Set digital trimpot motor current using axis codes.
909 909
         #if EITHER(HAS_MOTOR_CURRENT_SPI, HAS_MOTOR_CURRENT_DAC)
910 910
           case 908: M908(); break;                                // M908: Control digital trimpot directly.
911
-          #if ENABLED(HAS_MOTOR_CURRENT_DAC)
911
+          #if HAS_MOTOR_CURRENT_DAC
912 912
             case 909: M909(); break;                              // M909: Print digipot/DAC current value
913 913
             case 910: M910(); break;                              // M910: Commit digipot/DAC value to external EEPROM
914 914
           #endif

+ 21
- 21
Marlin/src/gcode/gcode.h View File

@@ -524,7 +524,7 @@ private:
524 524
     static void G38(const int8_t subcode);
525 525
   #endif
526 526
 
527
-  #if ENABLED(HAS_MESH)
527
+  #if HAS_MESH
528 528
     static void G42();
529 529
   #endif
530 530
 
@@ -557,7 +557,7 @@ private:
557 557
     static void G425();
558 558
   #endif
559 559
 
560
-  #if ENABLED(HAS_RESUME_CONTINUE)
560
+  #if HAS_RESUME_CONTINUE
561 561
     static void M0_M1();
562 562
   #endif
563 563
 
@@ -612,7 +612,7 @@ private:
612 612
   static void M31();
613 613
 
614 614
   #if ENABLED(SDSUPPORT)
615
-    #if ENABLED(HAS_MEDIA_SUBCALLS)
615
+    #if HAS_MEDIA_SUBCALLS
616 616
       static void M32();
617 617
     #endif
618 618
     #if ENABLED(LONG_FILENAME_HOST_SUPPORT)
@@ -743,7 +743,7 @@ private:
743 743
     static void M149();
744 744
   #endif
745 745
 
746
-  #if ENABLED(HAS_COLOR_LEDS)
746
+  #if HAS_COLOR_LEDS
747 747
     static void M150();
748 748
   #endif
749 749
 
@@ -777,7 +777,7 @@ private:
777 777
   static void M204();
778 778
   static void M205();
779 779
 
780
-  #if ENABLED(HAS_M206_COMMAND)
780
+  #if HAS_M206_COMMAND
781 781
     static void M206();
782 782
   #endif
783 783
 
@@ -791,11 +791,11 @@ private:
791 791
 
792 792
   static void M211();
793 793
 
794
-  #if ENABLED(HAS_MULTI_EXTRUDER)
794
+  #if HAS_MULTI_EXTRUDER
795 795
     static void M217();
796 796
   #endif
797 797
 
798
-  #if ENABLED(HAS_HOTEND_OFFSET)
798
+  #if HAS_HOTEND_OFFSET
799 799
     static void M218();
800 800
   #endif
801 801
 
@@ -813,7 +813,7 @@ private:
813 813
     static void M240();
814 814
   #endif
815 815
 
816
-  #if ENABLED(HAS_LCD_CONTRAST)
816
+  #if HAS_LCD_CONTRAST
817 817
     static void M250();
818 818
   #endif
819 819
 
@@ -833,7 +833,7 @@ private:
833 833
     static void M290();
834 834
   #endif
835 835
 
836
-  #if ENABLED(HAS_BUZZER)
836
+  #if HAS_BUZZER
837 837
     static void M300();
838 838
   #endif
839 839
 
@@ -845,7 +845,7 @@ private:
845 845
     static void M302();
846 846
   #endif
847 847
 
848
-  #if ENABLED(HAS_PID_HEATING)
848
+  #if HAS_PID_HEATING
849 849
     static void M303();
850 850
   #endif
851 851
 
@@ -853,7 +853,7 @@ private:
853 853
     static void M304();
854 854
   #endif
855 855
 
856
-  #if ENABLED(HAS_USER_THERMISTORS)
856
+  #if HAS_USER_THERMISTORS
857 857
     static void M305();
858 858
   #endif
859 859
 
@@ -894,7 +894,7 @@ private:
894 894
     static void M402();
895 895
   #endif
896 896
 
897
-  #if ENABLED(HAS_PRUSA_MMU2)
897
+  #if HAS_PRUSA_MMU2
898 898
     static void M403();
899 899
   #endif
900 900
 
@@ -905,11 +905,11 @@ private:
905 905
     static void M407();
906 906
   #endif
907 907
 
908
-  #if ENABLED(HAS_FILAMENT_SENSOR)
908
+  #if HAS_FILAMENT_SENSOR
909 909
     static void M412();
910 910
   #endif
911 911
 
912
-  #if ENABLED(HAS_MULTI_LANGUAGE)
912
+  #if HAS_MULTI_LANGUAGE
913 913
     static void M414();
914 914
   #endif
915 915
 
@@ -922,11 +922,11 @@ private:
922 922
     static void M425();
923 923
   #endif
924 924
 
925
-  #if ENABLED(HAS_M206_COMMAND)
925
+  #if HAS_M206_COMMAND
926 926
     static void M428();
927 927
   #endif
928 928
 
929
-  #if ENABLED(HAS_POWER_MONITOR)
929
+  #if HAS_POWER_MONITOR
930 930
     static void M430();
931 931
   #endif
932 932
 
@@ -977,11 +977,11 @@ private:
977 977
     static void M603();
978 978
   #endif
979 979
 
980
-  #if ENABLED(HAS_DUPLICATION_MODE)
980
+  #if HAS_DUPLICATION_MODE
981 981
     static void M605();
982 982
   #endif
983 983
 
984
-  #if ENABLED(IS_KINEMATIC)
984
+  #if IS_KINEMATIC
985 985
     static void M665();
986 986
   #endif
987 987
 
@@ -1006,7 +1006,7 @@ private:
1006 1006
     static void M810_819();
1007 1007
   #endif
1008 1008
 
1009
-  #if ENABLED(HAS_BED_PROBE)
1009
+  #if HAS_BED_PROBE
1010 1010
     static void M851();
1011 1011
   #endif
1012 1012
 
@@ -1039,7 +1039,7 @@ private:
1039 1039
   #if HAS_TRINAMIC_CONFIG
1040 1040
     static void M122();
1041 1041
     static void M906();
1042
-    #if ENABLED(HAS_STEALTHCHOP)
1042
+    #if HAS_STEALTHCHOP
1043 1043
       static void M569();
1044 1044
     #endif
1045 1045
     #if ENABLED(MONITOR_DRIVER_STATUS)
@@ -1066,7 +1066,7 @@ private:
1066 1066
     static void M907();
1067 1067
     #if EITHER(HAS_MOTOR_CURRENT_SPI, HAS_MOTOR_CURRENT_DAC)
1068 1068
       static void M908();
1069
-      #if ENABLED(HAS_MOTOR_CURRENT_DAC)
1069
+      #if HAS_MOTOR_CURRENT_DAC
1070 1070
         static void M909();
1071 1071
         static void M910();
1072 1072
       #endif

+ 1
- 1
Marlin/src/gcode/queue.h View File

@@ -59,7 +59,7 @@ public:
59 59
   struct CommandLine {
60 60
     char buffer[MAX_CMD_SIZE];      //!< The command buffer
61 61
     bool skip_ok;                   //!< Skip sending ok when command is processed?
62
-    #if ENABLED(HAS_MULTI_SERIAL)
62
+    #if HAS_MULTI_SERIAL
63 63
       serial_index_t port;          //!< Serial port the command was received on
64 64
     #endif
65 65
   };

+ 1
- 1
Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp View File

@@ -536,7 +536,7 @@ void ST7920_Lite_Status_Screen::draw_heat_icon(const bool whichIcon, const bool
536 536
 static struct {
537 537
   bool E1_show_target  : 1;
538 538
   bool E2_show_target  : 1;
539
-  #if ENABLED(HAS_HEATED_BED)
539
+  #if HAS_HEATED_BED
540 540
     bool bed_show_target : 1;
541 541
   #endif
542 542
 } display_state = {

+ 2
- 2
Marlin/src/lcd/dwin/e3v2/dwin.cpp View File

@@ -182,10 +182,10 @@ static uint8_t _card_percent = 0;
182 182
 static uint16_t _remain_time = 0;
183 183
 
184 184
 #if ENABLED(PAUSE_HEAT)
185
-  #if ENABLED(HAS_HOTEND)
185
+  #if HAS_HOTEND
186 186
     uint16_t resume_hotend_temp = 0;
187 187
   #endif
188
-  #if ENABLED(HAS_HEATED_BED)
188
+  #if HAS_HEATED_BED
189 189
     uint16_t resume_bed_temp = 0;
190 190
   #endif
191 191
 #endif

+ 6
- 6
Marlin/src/lcd/dwin/e3v2/dwin.h View File

@@ -255,13 +255,13 @@ extern char print_filename[16];
255 255
 extern millis_t dwin_heat_time;
256 256
 
257 257
 typedef struct {
258
-  #if ENABLED(HAS_HOTEND)
258
+  #if HAS_HOTEND
259 259
     celsius_t E_Temp = 0;
260 260
   #endif
261
-  #if ENABLED(HAS_HEATED_BED)
261
+  #if HAS_HEATED_BED
262 262
     celsius_t Bed_Temp = 0;
263 263
   #endif
264
-  #if ENABLED(HAS_FAN)
264
+  #if HAS_FAN
265 265
     int16_t Fan_speed = 0;
266 266
   #endif
267 267
   int16_t print_speed     = 100;
@@ -344,13 +344,13 @@ void HMI_Move_E();
344 344
 
345 345
 void HMI_Zoffset();
346 346
 
347
-#if ENABLED(HAS_HOTEND)
347
+#if HAS_HOTEND
348 348
   void HMI_ETemp();
349 349
 #endif
350
-#if ENABLED(HAS_HEATED_BED)
350
+#if HAS_HEATED_BED
351 351
   void HMI_BedTemp();
352 352
 #endif
353
-#if ENABLED(HAS_FAN)
353
+#if HAS_FAN
354 354
   void HMI_FanSpeed();
355 355
 #endif
356 356
 

+ 1
- 1
Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp View File

@@ -622,7 +622,7 @@ void DGUSScreenHandler::HandleHeaterControl(DGUS_VP_Variable &var, void *val_ptr
622 622
     DEBUG_ECHOLNPGM("HandlePreheat");
623 623
 
624 624
     uint8_t e_temp = 0;
625
-    #if ENABLED(HAS_HEATED_BED)
625
+    #if HAS_HEATED_BED
626 626
       uint8_t bed_temp = 0;
627 627
     #endif
628 628
     const uint16_t preheat_option = swap16(*(uint16_t*)val_ptr);

+ 1
- 1
Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp View File

@@ -35,7 +35,7 @@
35 35
 #include "../../ui_api.h"
36 36
 #include "../../../marlinui.h"
37 37
 
38
-#if ENABLED(HAS_STEALTHCHOP)
38
+#if HAS_STEALTHCHOP
39 39
   #include "../../../../module/stepper/trinamic.h"
40 40
 #endif
41 41
 

+ 2
- 2
Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp View File

@@ -37,7 +37,7 @@
37 37
 
38 38
 #include "../../../../gcode/gcode.h"
39 39
 
40
-#if ENABLED(HAS_STEALTHCHOP)
40
+#if HAS_STEALTHCHOP
41 41
   #include "../../../../module/stepper/trinamic.h"
42 42
   #include "../../../../module/stepper/indirection.h"
43 43
 #endif
@@ -396,7 +396,7 @@ void DGUSScreenHandler::Z_offset_select(DGUS_VP_Variable &var, void *val_ptr) {
396 396
 
397 397
 void DGUSScreenHandler::GetOffsetValue(DGUS_VP_Variable &var, void *val_ptr) {
398 398
 
399
-  #if ENABLED(HAS_BED_PROBE)
399
+  #if HAS_BED_PROBE
400 400
     int32_t value = swap32(*(int32_t *)val_ptr);
401 401
     float Offset = value / 100.0f;
402 402
     DEBUG_ECHOLNPAIR_F("\nget int6 offset >> ", value, 6);

+ 1
- 1
Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/advanced_settings_menu.cpp View File

@@ -122,7 +122,7 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) {
122 122
     case  2: GOTO_SCREEN(ZOffsetScreen);              break;
123 123
     #endif
124 124
     case  3: GOTO_SCREEN(StepsScreen);                break;
125
-    #if ENABLED(HAS_MULTI_HOTEND)
125
+    #if HAS_MULTI_HOTEND
126 126
     case  4: GOTO_SCREEN(NozzleOffsetScreen);         break;
127 127
     #endif
128 128
     case  5: GOTO_SCREEN(MaxVelocityScreen);          break;

+ 1
- 1
Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp View File

@@ -106,7 +106,7 @@ bool LevelingMenu::onTouchEnd(uint8_t tag) {
106 106
     #if EITHER(Z_STEPPER_AUTO_ALIGN,MECHANICAL_GANTRY_CALIBRATION)
107 107
       case 2: SpinnerDialogBox::enqueueAndWait_P(F("G34")); break;
108 108
     #endif
109
-    #if ENABLED(HAS_BED_PROBE)
109
+    #if HAS_BED_PROBE
110 110
       case 3:
111 111
         #ifndef BED_LEVELING_COMMANDS
112 112
           #define BED_LEVELING_COMMANDS "G29"

+ 1
- 1
Marlin/src/lcd/extui/mks_ui/draw_printing.cpp View File

@@ -49,7 +49,7 @@ static lv_obj_t *labelPause, *labelStop, *labelOperat;
49 49
 static lv_obj_t *bar1, *bar1ValueText;
50 50
 static lv_obj_t *buttonPause, *buttonOperat, *buttonStop, *buttonExt1, *buttonExt2, *buttonBedstate, *buttonFanstate, *buttonZpos;
51 51
 
52
-#if ENABLED(HAS_MULTI_EXTRUDER)
52
+#if HAS_MULTI_EXTRUDER
53 53
   static lv_obj_t *labelExt2;
54 54
 #endif
55 55
 

+ 8
- 8
Marlin/src/lcd/extui/ui_api.cpp View File

@@ -178,10 +178,10 @@ namespace ExtUI {
178 178
         #if HAS_HEATED_BED
179 179
           case BED: thermalManager.reset_bed_idle_timer(); return;
180 180
         #endif
181
-        #if ENABLED(HAS_HEATED_CHAMBER)
181
+        #if HAS_HEATED_CHAMBER
182 182
           case CHAMBER: return; // Chamber has no idle timer
183 183
         #endif
184
-        #if ENABLED(HAS_COOLER)
184
+        #if HAS_COOLER
185 185
           case COOLER: return;  // Cooler has no idle timer
186 186
         #endif
187 187
         default:
@@ -241,10 +241,10 @@ namespace ExtUI {
241 241
   bool isHeaterIdle(const heater_t heater) {
242 242
     #if HEATER_IDLE_HANDLER
243 243
       switch (heater) {
244
-        #if ENABLED(HAS_HEATED_BED)
244
+        #if HAS_HEATED_BED
245 245
           case BED: return thermalManager.heater_idle[thermalManager.IDLE_INDEX_BED].timed_out;
246 246
         #endif
247
-        #if ENABLED(HAS_HEATED_CHAMBER)
247
+        #if HAS_HEATED_CHAMBER
248 248
           case CHAMBER: return false; // Chamber has no idle timer
249 249
         #endif
250 250
         default:
@@ -264,10 +264,10 @@ namespace ExtUI {
264 264
 
265 265
   celsius_float_t getActualTemp_celsius(const heater_t heater) {
266 266
     switch (heater) {
267
-      #if ENABLED(HAS_HEATED_BED)
267
+      #if HAS_HEATED_BED
268 268
         case BED: return GET_TEMP_ADJUSTMENT(thermalManager.degBed());
269 269
       #endif
270
-      #if ENABLED(HAS_HEATED_CHAMBER)
270
+      #if HAS_HEATED_CHAMBER
271 271
         case CHAMBER: return GET_TEMP_ADJUSTMENT(thermalManager.degChamber());
272 272
       #endif
273 273
       default: return GET_TEMP_ADJUSTMENT(thermalManager.degHotend(heater - H0));
@@ -280,10 +280,10 @@ namespace ExtUI {
280 280
 
281 281
   celsius_float_t getTargetTemp_celsius(const heater_t heater) {
282 282
     switch (heater) {
283
-      #if ENABLED(HAS_HEATED_BED)
283
+      #if HAS_HEATED_BED
284 284
         case BED: return GET_TEMP_ADJUSTMENT(thermalManager.degTargetBed());
285 285
       #endif
286
-      #if ENABLED(HAS_HEATED_CHAMBER)
286
+      #if HAS_HEATED_CHAMBER
287 287
         case CHAMBER: return GET_TEMP_ADJUSTMENT(thermalManager.degTargetChamber());
288 288
       #endif
289 289
       default: return GET_TEMP_ADJUSTMENT(thermalManager.degTargetHotend(heater - H0));

+ 5
- 5
Marlin/src/lcd/marlinui.h View File

@@ -111,13 +111,13 @@
111 111
 
112 112
 #if PREHEAT_COUNT
113 113
   typedef struct {
114
-    #if ENABLED(HAS_HOTEND)
114
+    #if HAS_HOTEND
115 115
       celsius_t hotend_temp;
116 116
     #endif
117
-    #if ENABLED(HAS_HEATED_BED)
117
+    #if HAS_HEATED_BED
118 118
       celsius_t bed_temp;
119 119
     #endif
120
-    #if ENABLED(HAS_FAN)
120
+    #if HAS_FAN
121 121
       uint16_t fan_speed;
122 122
     #endif
123 123
   } preheat_t;
@@ -135,12 +135,12 @@
135 135
       static int8_t constexpr e_index = 0;
136 136
     #endif
137 137
     static millis_t start_time;
138
-    #if ENABLED(IS_KINEMATIC)
138
+    #if IS_KINEMATIC
139 139
       static xyze_pos_t all_axes_destination;
140 140
     #endif
141 141
   public:
142 142
     static float menu_scale;
143
-    #if ENABLED(IS_KINEMATIC)
143
+    #if IS_KINEMATIC
144 144
       static float offset;
145 145
     #endif
146 146
     template <typename T>

+ 2
- 2
Marlin/src/lcd/menu/menu_advanced.cpp View File

@@ -58,7 +58,7 @@
58 58
 void menu_tmc();
59 59
 void menu_backlash();
60 60
 
61
-#if ENABLED(HAS_MOTOR_CURRENT_DAC)
61
+#if HAS_MOTOR_CURRENT_DAC
62 62
 
63 63
   #include "../../feature/dac/stepper_dac.h"
64 64
 
@@ -590,7 +590,7 @@ void menu_advanced_settings() {
590 590
     SUBMENU(MSG_BACKLASH, menu_backlash);
591 591
   #endif
592 592
 
593
-  #if ENABLED(HAS_MOTOR_CURRENT_DAC)
593
+  #if HAS_MOTOR_CURRENT_DAC
594 594
     SUBMENU(MSG_DRIVE_STRENGTH, menu_dac);
595 595
   #endif
596 596
   #if HAS_MOTOR_CURRENT_PWM

+ 2
- 2
Marlin/src/module/settings.cpp View File

@@ -3818,10 +3818,10 @@ void MarlinSettings::reset() {
3818 3818
         SERIAL_CHAR(' ', 'B');                                 // B (maps to E1 by default)
3819 3819
         SERIAL_ECHOLN(stepper.motor_current_setting[4]);
3820 3820
       #endif
3821
-    #elif ENABLED(HAS_MOTOR_CURRENT_I2C)                       // i2c-based has any number of values
3821
+    #elif HAS_MOTOR_CURRENT_I2C                                // i2c-based has any number of values
3822 3822
       // Values sent over i2c are not stored.
3823 3823
       // Indexes map directly to drivers, not axes.
3824
-    #elif ENABLED(HAS_MOTOR_CURRENT_DAC)                       // DAC-based has 4 values, for X Y Z (I J K) E
3824
+    #elif HAS_MOTOR_CURRENT_DAC                                // DAC-based has 4 values, for X Y Z (I J K) E
3825 3825
       // Values sent over i2c are not stored. Uses indirect mapping.
3826 3826
     #endif
3827 3827
 

+ 7
- 7
Marlin/src/module/temperature.h View File

@@ -340,16 +340,16 @@ class Temperature {
340 340
       static const celsius_t hotend_maxtemp[HOTENDS];
341 341
       static inline celsius_t hotend_max_target(const uint8_t e) { return hotend_maxtemp[e] - (HOTEND_OVERSHOOT); }
342 342
     #endif
343
-    #if ENABLED(HAS_HEATED_BED)
343
+    #if HAS_HEATED_BED
344 344
       static bed_info_t temp_bed;
345 345
     #endif
346
-    #if ENABLED(HAS_TEMP_PROBE)
346
+    #if HAS_TEMP_PROBE
347 347
       static probe_info_t temp_probe;
348 348
     #endif
349
-    #if ENABLED(HAS_TEMP_CHAMBER)
349
+    #if HAS_TEMP_CHAMBER
350 350
       static chamber_info_t temp_chamber;
351 351
     #endif
352
-    #if ENABLED(HAS_TEMP_COOLER)
352
+    #if HAS_TEMP_COOLER
353 353
       static cooler_info_t temp_cooler;
354 354
     #endif
355 355
     #if HAS_TEMP_REDUNDANT
@@ -450,7 +450,7 @@ class Temperature {
450 450
       static lpq_ptr_t lpq_ptr;
451 451
     #endif
452 452
 
453
-    #if ENABLED(HAS_HOTEND)
453
+    #if HAS_HOTEND
454 454
       static temp_range_t temp_range[HOTENDS];
455 455
     #endif
456 456
 
@@ -486,7 +486,7 @@ class Temperature {
486 486
       static millis_t preheat_end_time[HOTENDS];
487 487
     #endif
488 488
 
489
-    #if ENABLED(HAS_AUTO_FAN)
489
+    #if HAS_AUTO_FAN
490 490
       static millis_t next_auto_fan_check_ms;
491 491
     #endif
492 492
 
@@ -920,7 +920,7 @@ class Temperature {
920 920
 
921 921
     static void checkExtruderAutoFans();
922 922
 
923
-    #if ENABLED(HAS_HOTEND)
923
+    #if HAS_HOTEND
924 924
       static float get_pid_output_hotend(const uint8_t e);
925 925
     #endif
926 926
     #if ENABLED(PIDTEMPBED)

+ 1
- 1
Marlin/src/pins/ramps/pins_DAGOMA_F5.h View File

@@ -51,7 +51,7 @@
51 51
 //
52 52
 // DAC steppers
53 53
 //
54
-#define HAS_MOTOR_CURRENT_DAC
54
+#define HAS_MOTOR_CURRENT_DAC 1
55 55
 
56 56
 #define DAC_STEPPER_ORDER { 0, 1, 2, 3 }
57 57
 

+ 1
- 1
Marlin/src/pins/ramps/pins_RIGIDBOARD_V2.h View File

@@ -34,7 +34,7 @@
34 34
 //
35 35
 
36 36
 // I2C based DAC like on the Printrboard REVF
37
-#define HAS_MOTOR_CURRENT_DAC
37
+#define HAS_MOTOR_CURRENT_DAC 1
38 38
 
39 39
 // Channels available for DAC, For Rigidboard there are 4
40 40
 #define DAC_STEPPER_ORDER { 0, 1, 2, 3 }

+ 1
- 1
Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h View File

@@ -141,7 +141,7 @@
141 141
 #endif // NO_EXTRUDRBOARD
142 142
 
143 143
 // Enable control of stepper motor currents with the I2C based MCP4728 DAC used on Printrboard REVF
144
-#define HAS_MOTOR_CURRENT_DAC
144
+#define HAS_MOTOR_CURRENT_DAC 1
145 145
 
146 146
 // Set default drive strength percents if not already defined - X, Y, Z, E axis
147 147
 #ifndef DAC_MOTOR_CURRENT_DEFAULT

+ 1
- 1
Marlin/src/sd/cardreader.cpp View File

@@ -1153,7 +1153,7 @@ void CardReader::cdroot() {
1153 1153
           #if DISABLED(SDSORT_USES_RAM)
1154 1154
             selectFileByIndex(o1);              // Pre-fetch the first entry and save it
1155 1155
             strcpy(name1, longest_filename());  // so the loop only needs one fetch
1156
-            #if ENABLED(HAS_FOLDER_SORTING)
1156
+            #if HAS_FOLDER_SORTING
1157 1157
               bool dir1 = flag.filenameIsDir;
1158 1158
             #endif
1159 1159
           #endif

Loading…
Cancel
Save