Browse Source

🎨 Check flags without ENABLED

Scott Lahteine 4 years ago
parent
commit
26bfc26797
31 changed files with 90 additions and 90 deletions
  1. 2
    2
      Marlin/src/MarlinCore.cpp
  2. 1
    1
      Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
  3. 1
    1
      Marlin/src/feature/dac/dac_mcp4728.cpp
  4. 1
    1
      Marlin/src/feature/dac/stepper_dac.cpp
  5. 3
    3
      Marlin/src/feature/joystick.h
  6. 6
    6
      Marlin/src/feature/powerloss.h
  7. 1
    1
      Marlin/src/feature/tmc_util.h
  8. 1
    1
      Marlin/src/gcode/calibrate/G33.cpp
  9. 4
    4
      Marlin/src/gcode/calibrate/G34.cpp
  10. 3
    3
      Marlin/src/gcode/feature/digipot/M907-M910.cpp
  11. 1
    1
      Marlin/src/gcode/gcode.cpp
  12. 21
    21
      Marlin/src/gcode/gcode.h
  13. 1
    1
      Marlin/src/gcode/queue.h
  14. 1
    1
      Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp
  15. 2
    2
      Marlin/src/lcd/dwin/e3v2/dwin.cpp
  16. 6
    6
      Marlin/src/lcd/dwin/e3v2/dwin.h
  17. 1
    1
      Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp
  18. 1
    1
      Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp
  19. 2
    2
      Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp
  20. 1
    1
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/advanced_settings_menu.cpp
  21. 1
    1
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp
  22. 1
    1
      Marlin/src/lcd/extui/mks_ui/draw_printing.cpp
  23. 8
    8
      Marlin/src/lcd/extui/ui_api.cpp
  24. 5
    5
      Marlin/src/lcd/marlinui.h
  25. 2
    2
      Marlin/src/lcd/menu/menu_advanced.cpp
  26. 2
    2
      Marlin/src/module/settings.cpp
  27. 7
    7
      Marlin/src/module/temperature.h
  28. 1
    1
      Marlin/src/pins/ramps/pins_DAGOMA_F5.h
  29. 1
    1
      Marlin/src/pins/ramps/pins_RIGIDBOARD_V2.h
  30. 1
    1
      Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h
  31. 1
    1
      Marlin/src/sd/cardreader.cpp

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

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

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

307
 
307
 
308
   const uint8_t p_val = parser.byteval('P');
308
   const uint8_t p_val = parser.byteval('P');
309
   const bool may_move = p_val == 1 || p_val == 2 || p_val == 4 || parser.seen_test('J');
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
     const uint8_t old_tool_index = active_extruder;
311
     const uint8_t old_tool_index = active_extruder;
312
   #endif
312
   #endif
313
 
313
 

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

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

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

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

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

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

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

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

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

363
 
363
 
364
     struct motion_state_t {
364
     struct motion_state_t {
365
       xy_ulong_t acceleration;
365
       xy_ulong_t acceleration;
366
-      #if ENABLED(HAS_CLASSIC_JERK)
366
+      #if HAS_CLASSIC_JERK
367
         xy_float_t jerk_state;
367
         xy_float_t jerk_state;
368
       #endif
368
       #endif
369
     };
369
     };

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

63
 #define LOOP_CAL_RAD(VAR) LOOP_CAL_PT(VAR, __A, _7P_STEP)
63
 #define LOOP_CAL_RAD(VAR) LOOP_CAL_PT(VAR, __A, _7P_STEP)
64
 #define LOOP_CAL_ACT(VAR, _4P, _OP) LOOP_CAL_PT(VAR, _OP ? _AB : __A, _4P ? _4P_STEP : _7P_STEP)
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
   const uint8_t old_tool_index = active_extruder;
67
   const uint8_t old_tool_index = active_extruder;
68
 #endif
68
 #endif
69
 
69
 

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

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

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

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

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

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

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

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

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

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

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

536
 static struct {
536
 static struct {
537
   bool E1_show_target  : 1;
537
   bool E1_show_target  : 1;
538
   bool E2_show_target  : 1;
538
   bool E2_show_target  : 1;
539
-  #if ENABLED(HAS_HEATED_BED)
539
+  #if HAS_HEATED_BED
540
     bool bed_show_target : 1;
540
     bool bed_show_target : 1;
541
   #endif
541
   #endif
542
 } display_state = {
542
 } display_state = {

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

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

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

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

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

622
     DEBUG_ECHOLNPGM("HandlePreheat");
622
     DEBUG_ECHOLNPGM("HandlePreheat");
623
 
623
 
624
     uint8_t e_temp = 0;
624
     uint8_t e_temp = 0;
625
-    #if ENABLED(HAS_HEATED_BED)
625
+    #if HAS_HEATED_BED
626
       uint8_t bed_temp = 0;
626
       uint8_t bed_temp = 0;
627
     #endif
627
     #endif
628
     const uint16_t preheat_option = swap16(*(uint16_t*)val_ptr);
628
     const uint16_t preheat_option = swap16(*(uint16_t*)val_ptr);

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

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

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

37
 
37
 
38
 #include "../../../../gcode/gcode.h"
38
 #include "../../../../gcode/gcode.h"
39
 
39
 
40
-#if ENABLED(HAS_STEALTHCHOP)
40
+#if HAS_STEALTHCHOP
41
   #include "../../../../module/stepper/trinamic.h"
41
   #include "../../../../module/stepper/trinamic.h"
42
   #include "../../../../module/stepper/indirection.h"
42
   #include "../../../../module/stepper/indirection.h"
43
 #endif
43
 #endif
396
 
396
 
397
 void DGUSScreenHandler::GetOffsetValue(DGUS_VP_Variable &var, void *val_ptr) {
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
     int32_t value = swap32(*(int32_t *)val_ptr);
400
     int32_t value = swap32(*(int32_t *)val_ptr);
401
     float Offset = value / 100.0f;
401
     float Offset = value / 100.0f;
402
     DEBUG_ECHOLNPAIR_F("\nget int6 offset >> ", value, 6);
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
     case  2: GOTO_SCREEN(ZOffsetScreen);              break;
122
     case  2: GOTO_SCREEN(ZOffsetScreen);              break;
123
     #endif
123
     #endif
124
     case  3: GOTO_SCREEN(StepsScreen);                break;
124
     case  3: GOTO_SCREEN(StepsScreen);                break;
125
-    #if ENABLED(HAS_MULTI_HOTEND)
125
+    #if HAS_MULTI_HOTEND
126
     case  4: GOTO_SCREEN(NozzleOffsetScreen);         break;
126
     case  4: GOTO_SCREEN(NozzleOffsetScreen);         break;
127
     #endif
127
     #endif
128
     case  5: GOTO_SCREEN(MaxVelocityScreen);          break;
128
     case  5: GOTO_SCREEN(MaxVelocityScreen);          break;

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

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

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

49
 static lv_obj_t *bar1, *bar1ValueText;
49
 static lv_obj_t *bar1, *bar1ValueText;
50
 static lv_obj_t *buttonPause, *buttonOperat, *buttonStop, *buttonExt1, *buttonExt2, *buttonBedstate, *buttonFanstate, *buttonZpos;
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
   static lv_obj_t *labelExt2;
53
   static lv_obj_t *labelExt2;
54
 #endif
54
 #endif
55
 
55
 

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

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

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

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

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

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

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

3818
         SERIAL_CHAR(' ', 'B');                                 // B (maps to E1 by default)
3818
         SERIAL_CHAR(' ', 'B');                                 // B (maps to E1 by default)
3819
         SERIAL_ECHOLN(stepper.motor_current_setting[4]);
3819
         SERIAL_ECHOLN(stepper.motor_current_setting[4]);
3820
       #endif
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
       // Values sent over i2c are not stored.
3822
       // Values sent over i2c are not stored.
3823
       // Indexes map directly to drivers, not axes.
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
       // Values sent over i2c are not stored. Uses indirect mapping.
3825
       // Values sent over i2c are not stored. Uses indirect mapping.
3826
     #endif
3826
     #endif
3827
 
3827
 

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

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

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

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

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

34
 //
34
 //
35
 
35
 
36
 // I2C based DAC like on the Printrboard REVF
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
 // Channels available for DAC, For Rigidboard there are 4
39
 // Channels available for DAC, For Rigidboard there are 4
40
 #define DAC_STEPPER_ORDER { 0, 1, 2, 3 }
40
 #define DAC_STEPPER_ORDER { 0, 1, 2, 3 }

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

141
 #endif // NO_EXTRUDRBOARD
141
 #endif // NO_EXTRUDRBOARD
142
 
142
 
143
 // Enable control of stepper motor currents with the I2C based MCP4728 DAC used on Printrboard REVF
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
 // Set default drive strength percents if not already defined - X, Y, Z, E axis
146
 // Set default drive strength percents if not already defined - X, Y, Z, E axis
147
 #ifndef DAC_MOTOR_CURRENT_DEFAULT
147
 #ifndef DAC_MOTOR_CURRENT_DEFAULT

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

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

Loading…
Cancel
Save