Przeglądaj źródła

Apply composite tests

Scott Lahteine 4 lat temu
rodzic
commit
ab2b98e425
53 zmienionych plików z 103 dodań i 107 usunięć
  1. 1
    1
      Marlin/src/HAL/AVR/MarlinSerial.h
  2. 2
    2
      Marlin/src/HAL/AVR/inc/SanityCheck.h
  3. 1
    1
      Marlin/src/HAL/LINUX/spi_pins.h
  4. 1
    1
      Marlin/src/HAL/LPC1768/spi_pins.h
  5. 1
    1
      Marlin/src/HAL/STM32F1/dogm/u8g_com_stm32duino_swspi.cpp
  6. 1
    1
      Marlin/src/HAL/shared/HAL_ST7920.h
  7. 2
    2
      Marlin/src/MarlinCore.cpp
  8. 2
    2
      Marlin/src/feature/host_actions.cpp
  9. 2
    2
      Marlin/src/feature/mmu2/mmu2.cpp
  10. 2
    2
      Marlin/src/feature/mmu2/mmu2.h
  11. 1
    1
      Marlin/src/gcode/bedlevel/abl/G29.cpp
  12. 1
    1
      Marlin/src/gcode/calibrate/G34_M422.cpp
  13. 1
    1
      Marlin/src/gcode/control/M17_M18_M84.cpp
  14. 2
    2
      Marlin/src/gcode/feature/digipot/M907-M910.cpp
  15. 5
    5
      Marlin/src/gcode/gcode.cpp
  16. 4
    4
      Marlin/src/gcode/gcode.h
  17. 1
    1
      Marlin/src/gcode/temp/M155.cpp
  18. 5
    5
      Marlin/src/inc/Conditionals_post.h
  19. 4
    4
      Marlin/src/inc/SanityCheck.h
  20. 2
    2
      Marlin/src/lcd/HD44780/ultralcd_HD44780.cpp
  21. 5
    5
      Marlin/src/lcd/dogm/dogm_Statusscreen.h
  22. 1
    1
      Marlin/src/lcd/dogm/status_screen_DOGM.cpp
  23. 2
    2
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/advanced_settings_menu.cpp
  24. 2
    2
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bed_mesh_screen.cpp
  25. 1
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/junction_deviation_screen.cpp
  26. 1
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/main_menu.cpp
  27. 1
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/nozzle_offsets_screen.cpp
  28. 1
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/stepper_bump_sensitivity_screen.cpp
  29. 1
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/stepper_current_screen.cpp
  30. 1
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/z_offset_screen.cpp
  31. 6
    4
      Marlin/src/lcd/menu/menu_advanced.cpp
  32. 1
    1
      Marlin/src/lcd/menu/menu_backlash.cpp
  33. 1
    1
      Marlin/src/lcd/menu/menu_bed_corners.cpp
  34. 1
    1
      Marlin/src/lcd/menu/menu_cancelobject.cpp
  35. 2
    4
      Marlin/src/lcd/menu/menu_custom.cpp
  36. 1
    1
      Marlin/src/lcd/menu/menu_filament.cpp
  37. 1
    1
      Marlin/src/lcd/menu/menu_info.cpp
  38. 1
    1
      Marlin/src/lcd/menu/menu_job_recovery.cpp
  39. 1
    1
      Marlin/src/lcd/menu/menu_led.cpp
  40. 1
    1
      Marlin/src/lcd/menu/menu_main.cpp
  41. 1
    1
      Marlin/src/lcd/menu/menu_media.cpp
  42. 1
    1
      Marlin/src/lcd/menu/menu_mixer.cpp
  43. 2
    2
      Marlin/src/lcd/menu/menu_mmu2.cpp
  44. 1
    1
      Marlin/src/lcd/menu/menu_motion.cpp
  45. 1
    1
      Marlin/src/lcd/menu/menu_ubl.cpp
  46. 8
    12
      Marlin/src/lcd/ultralcd.cpp
  47. 1
    1
      Marlin/src/lcd/ultralcd.h
  48. 1
    1
      Marlin/src/module/configuration_store.cpp
  49. 6
    6
      Marlin/src/module/motion.cpp
  50. 1
    1
      Marlin/src/module/probe.cpp
  51. 3
    3
      Marlin/src/module/stepper.cpp
  52. 2
    2
      Marlin/src/module/stepper.h
  53. 2
    2
      Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h

+ 1
- 1
Marlin/src/HAL/AVR/MarlinSerial.h Wyświetl plik

304
     static constexpr bool XONOFF            = false;
304
     static constexpr bool XONOFF            = false;
305
     static constexpr bool EMERGENCYPARSER   = false;
305
     static constexpr bool EMERGENCYPARSER   = false;
306
     static constexpr bool DROPPED_RX        = false;
306
     static constexpr bool DROPPED_RX        = false;
307
-    static constexpr bool RX_OVERRUNS       = HAS_DGUS_LCD && ENABLED(DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS);
307
+    static constexpr bool RX_OVERRUNS       = BOTH(HAS_DGUS_LCD, DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS);
308
     static constexpr bool RX_FRAMING_ERRORS = false;
308
     static constexpr bool RX_FRAMING_ERRORS = false;
309
     static constexpr bool MAX_RX_QUEUED     = false;
309
     static constexpr bool MAX_RX_QUEUED     = false;
310
   };
310
   };

+ 2
- 2
Marlin/src/HAL/AVR/inc/SanityCheck.h Wyświetl plik

46
 /**
46
 /**
47
  * The Trinamic library includes SoftwareSerial.h, leading to a compile error.
47
  * The Trinamic library includes SoftwareSerial.h, leading to a compile error.
48
  */
48
  */
49
-#if HAS_TRINAMIC_CONFIG && ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
49
+#if BOTH(HAS_TRINAMIC_CONFIG, ENDSTOP_INTERRUPTS_FEATURE)
50
   #error "TMCStepper includes SoftwareSerial.h which is incompatible with ENDSTOP_INTERRUPTS_FEATURE. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."
50
   #error "TMCStepper includes SoftwareSerial.h which is incompatible with ENDSTOP_INTERRUPTS_FEATURE. Disable ENDSTOP_INTERRUPTS_FEATURE to continue."
51
 #endif
51
 #endif
52
 
52
 
53
-#if HAS_TMC_SW_SERIAL && ENABLED(MONITOR_DRIVER_STATUS)
53
+#if BOTH(HAS_TMC_SW_SERIAL, MONITOR_DRIVER_STATUS)
54
   #error "MONITOR_DRIVER_STATUS causes performance issues when used with SoftwareSerial-connected drivers. Disable MONITOR_DRIVER_STATUS or use hardware serial to continue."
54
   #error "MONITOR_DRIVER_STATUS causes performance issues when used with SoftwareSerial-connected drivers. Disable MONITOR_DRIVER_STATUS or use hardware serial to continue."
55
 #endif
55
 #endif

+ 1
- 1
Marlin/src/HAL/LINUX/spi_pins.h Wyświetl plik

24
 #include "../../core/macros.h"
24
 #include "../../core/macros.h"
25
 #include "../../inc/MarlinConfigPre.h"
25
 #include "../../inc/MarlinConfigPre.h"
26
 
26
 
27
-#if HAS_GRAPHICAL_LCD && ENABLED(SDSUPPORT) && (LCD_PINS_D4 == SCK_PIN || LCD_PINS_ENABLE == MOSI_PIN || DOGLCD_SCK == SCK_PIN || DOGLCD_MOSI == MOSI_PIN)
27
+#if BOTH(HAS_GRAPHICAL_LCD, SDSUPPORT) && (LCD_PINS_D4 == SCK_PIN || LCD_PINS_ENABLE == MOSI_PIN || DOGLCD_SCK == SCK_PIN || DOGLCD_MOSI == MOSI_PIN)
28
   #define LPC_SOFTWARE_SPI  // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently
28
   #define LPC_SOFTWARE_SPI  // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently
29
                             // needed due to the speed and mode required for communicating with each device being different.
29
                             // needed due to the speed and mode required for communicating with each device being different.
30
                             // This requirement can be removed if the SPI access to these devices is updated to use
30
                             // This requirement can be removed if the SPI access to these devices is updated to use

+ 1
- 1
Marlin/src/HAL/LPC1768/spi_pins.h Wyświetl plik

23
 
23
 
24
 #include "../../core/macros.h"
24
 #include "../../core/macros.h"
25
 
25
 
26
-#if ENABLED(SDSUPPORT) && HAS_GRAPHICAL_LCD && (LCD_PINS_D4 == SCK_PIN || LCD_PINS_ENABLE == MOSI_PIN || DOGLCD_SCK == SCK_PIN || DOGLCD_MOSI == MOSI_PIN)
26
+#if BOTH(SDSUPPORT, HAS_GRAPHICAL_LCD) && (LCD_PINS_D4 == SCK_PIN || LCD_PINS_ENABLE == MOSI_PIN || DOGLCD_SCK == SCK_PIN || DOGLCD_MOSI == MOSI_PIN)
27
   #define LPC_SOFTWARE_SPI  // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently
27
   #define LPC_SOFTWARE_SPI  // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently
28
                             // needed due to the speed and mode required for communicating with each device being different.
28
                             // needed due to the speed and mode required for communicating with each device being different.
29
                             // This requirement can be removed if the SPI access to these devices is updated to use
29
                             // This requirement can be removed if the SPI access to these devices is updated to use

+ 1
- 1
Marlin/src/HAL/STM32F1/dogm/u8g_com_stm32duino_swspi.cpp Wyświetl plik

20
 
20
 
21
 #include "../../../inc/MarlinConfig.h"
21
 #include "../../../inc/MarlinConfig.h"
22
 
22
 
23
-#if HAS_GRAPHICAL_LCD && ENABLED(FORCE_SOFT_SPI)
23
+#if BOTH(HAS_GRAPHICAL_LCD, FORCE_SOFT_SPI)
24
 
24
 
25
 #include "../HAL.h"
25
 #include "../HAL.h"
26
 #include <U8glib.h>
26
 #include <U8glib.h>

+ 1
- 1
Marlin/src/HAL/shared/HAL_ST7920.h Wyświetl plik

27
  * (bypassing U8G), it will allow the LIGHTWEIGHT_UI to operate.
27
  * (bypassing U8G), it will allow the LIGHTWEIGHT_UI to operate.
28
  */
28
  */
29
 
29
 
30
-#if HAS_GRAPHICAL_LCD && ENABLED(LIGHTWEIGHT_UI)
30
+#if BOTH(HAS_GRAPHICAL_LCD, LIGHTWEIGHT_UI)
31
   void ST7920_cs();
31
   void ST7920_cs();
32
   void ST7920_ncs();
32
   void ST7920_ncs();
33
   void ST7920_set_cmd();
33
   void ST7920_set_cmd();

+ 2
- 2
Marlin/src/MarlinCore.cpp Wyświetl plik

466
         if (ENABLED(DISABLE_INACTIVE_Y)) DISABLE_AXIS_Y();
466
         if (ENABLED(DISABLE_INACTIVE_Y)) DISABLE_AXIS_Y();
467
         if (ENABLED(DISABLE_INACTIVE_Z)) DISABLE_AXIS_Z();
467
         if (ENABLED(DISABLE_INACTIVE_Z)) DISABLE_AXIS_Z();
468
         if (ENABLED(DISABLE_INACTIVE_E)) disable_e_steppers();
468
         if (ENABLED(DISABLE_INACTIVE_E)) disable_e_steppers();
469
-        #if HAS_LCD_MENU && ENABLED(AUTO_BED_LEVELING_UBL)
469
+        #if BOTH(HAS_LCD_MENU, AUTO_BED_LEVELING_UBL)
470
           if (ubl.lcd_map_control) {
470
           if (ubl.lcd_map_control) {
471
             ubl.lcd_map_control = false;
471
             ubl.lcd_map_control = false;
472
             ui.defer_status_screen(false);
472
             ui.defer_status_screen(false);
943
   SETUP_RUN(ui.init());
943
   SETUP_RUN(ui.init());
944
   SETUP_RUN(ui.reset_status());       // Load welcome message early. (Retained if no errors exist.)
944
   SETUP_RUN(ui.reset_status());       // Load welcome message early. (Retained if no errors exist.)
945
 
945
 
946
-  #if HAS_SPI_LCD && ENABLED(SHOW_BOOTSCREEN)
946
+  #if BOTH(HAS_SPI_LCD, SHOW_BOOTSCREEN)
947
     SETUP_RUN(ui.show_bootscreen());
947
     SETUP_RUN(ui.show_bootscreen());
948
   #endif
948
   #endif
949
 
949
 

+ 2
- 2
Marlin/src/feature/host_actions.cpp Wyświetl plik

136
         switch (response) {
136
         switch (response) {
137
 
137
 
138
           case 0: // "Purge More" button
138
           case 0: // "Purge More" button
139
-            #if HAS_LCD_MENU && ENABLED(ADVANCED_PAUSE_FEATURE)
139
+            #if BOTH(HAS_LCD_MENU, ADVANCED_PAUSE_FEATURE)
140
               pause_menu_response = PAUSE_RESPONSE_EXTRUDE_MORE;  // Simulate menu selection (menu exits, doesn't extrude more)
140
               pause_menu_response = PAUSE_RESPONSE_EXTRUDE_MORE;  // Simulate menu selection (menu exits, doesn't extrude more)
141
             #endif
141
             #endif
142
             filament_load_host_prompt();                          // Initiate another host prompt. (NOTE: The loop in load_filament may also do this!)
142
             filament_load_host_prompt();                          // Initiate another host prompt. (NOTE: The loop in load_filament may also do this!)
143
             break;
143
             break;
144
 
144
 
145
           case 1: // "Continue" / "Disable Runout" button
145
           case 1: // "Continue" / "Disable Runout" button
146
-            #if HAS_LCD_MENU && ENABLED(ADVANCED_PAUSE_FEATURE)
146
+            #if BOTH(HAS_LCD_MENU, ADVANCED_PAUSE_FEATURE)
147
               pause_menu_response = PAUSE_RESPONSE_RESUME_PRINT;  // Simulate menu selection
147
               pause_menu_response = PAUSE_RESPONSE_RESUME_PRINT;  // Simulate menu selection
148
             #endif
148
             #endif
149
             #if HAS_FILAMENT_SENSOR
149
             #if HAS_FILAMENT_SENSOR

+ 2
- 2
Marlin/src/feature/mmu2/mmu2.cpp Wyświetl plik

99
 millis_t MMU2::last_request, MMU2::next_P0_request;
99
 millis_t MMU2::last_request, MMU2::next_P0_request;
100
 char MMU2::rx_buffer[MMU_RX_SIZE], MMU2::tx_buffer[MMU_TX_SIZE];
100
 char MMU2::rx_buffer[MMU_RX_SIZE], MMU2::tx_buffer[MMU_TX_SIZE];
101
 
101
 
102
-#if HAS_LCD_MENU && ENABLED(MMU2_MENUS)
102
+#if BOTH(HAS_LCD_MENU, MMU2_MENUS)
103
 
103
 
104
   struct E_Step {
104
   struct E_Step {
105
     float extrude;        //!< extrude distance in mm
105
     float extrude;        //!< extrude distance in mm
632
   planner.synchronize();
632
   planner.synchronize();
633
 }
633
 }
634
 
634
 
635
-#if HAS_LCD_MENU && ENABLED(MMU2_MENUS)
635
+#if BOTH(HAS_LCD_MENU, MMU2_MENUS)
636
 
636
 
637
   // Load filament into MMU2
637
   // Load filament into MMU2
638
   void MMU2::load_filament(uint8_t index) {
638
   void MMU2::load_filament(uint8_t index) {

+ 2
- 2
Marlin/src/feature/mmu2/mmu2.h Wyświetl plik

49
   static uint8_t get_current_tool();
49
   static uint8_t get_current_tool();
50
   static void set_filament_type(uint8_t index, uint8_t type);
50
   static void set_filament_type(uint8_t index, uint8_t type);
51
 
51
 
52
-  #if HAS_LCD_MENU && ENABLED(MMU2_MENUS)
52
+  #if BOTH(HAS_LCD_MENU, MMU2_MENUS)
53
     static bool unload();
53
     static bool unload();
54
     static void load_filament(uint8_t);
54
     static void load_filament(uint8_t);
55
     static void load_all();
55
     static void load_all();
72
   static bool get_response();
72
   static bool get_response();
73
   static void manage_response(const bool move_axes, const bool turn_off_nozzle);
73
   static void manage_response(const bool move_axes, const bool turn_off_nozzle);
74
 
74
 
75
-  #if HAS_LCD_MENU && ENABLED(MMU2_MENUS)
75
+  #if BOTH(HAS_LCD_MENU, MMU2_MENUS)
76
     static void load_to_nozzle();
76
     static void load_to_nozzle();
77
     static void filament_ramming();
77
     static void filament_ramming();
78
     static void execute_extruder_sequence(const E_Step * sequence, int steps);
78
     static void execute_extruder_sequence(const E_Step * sequence, int steps);

+ 1
- 1
Marlin/src/gcode/bedlevel/abl/G29.cpp Wyświetl plik

223
     ABL_VAR int abl_probe_index;
223
     ABL_VAR int abl_probe_index;
224
   #endif
224
   #endif
225
 
225
 
226
-  #if HAS_SOFTWARE_ENDSTOPS && ENABLED(PROBE_MANUALLY)
226
+  #if BOTH(HAS_SOFTWARE_ENDSTOPS, PROBE_MANUALLY)
227
     ABL_VAR bool saved_soft_endstops_state = true;
227
     ABL_VAR bool saved_soft_endstops_state = true;
228
   #endif
228
   #endif
229
 
229
 

+ 1
- 1
Marlin/src/gcode/calibrate/G34_M422.cpp Wyświetl plik

378
     // Restore the active tool after homing
378
     // Restore the active tool after homing
379
     TERN_(HAS_MULTI_HOTEND, tool_change(old_tool_index, DISABLED(PARKING_EXTRUDER))); // Fetch previous tool for parking extruder
379
     TERN_(HAS_MULTI_HOTEND, tool_change(old_tool_index, DISABLED(PARKING_EXTRUDER))); // Fetch previous tool for parking extruder
380
 
380
 
381
-    #if HAS_LEVELING && ENABLED(RESTORE_LEVELING_AFTER_G34)
381
+    #if BOTH(HAS_LEVELING, RESTORE_LEVELING_AFTER_G34)
382
       set_bed_leveling_enabled(leveling_was_active);
382
       set_bed_leveling_enabled(leveling_was_active);
383
     #endif
383
     #endif
384
 
384
 

+ 1
- 1
Marlin/src/gcode/control/M17_M18_M84.cpp Wyświetl plik

63
     else
63
     else
64
       planner.finish_and_disable();
64
       planner.finish_and_disable();
65
 
65
 
66
-    #if HAS_LCD_MENU && ENABLED(AUTO_BED_LEVELING_UBL)
66
+    #if BOTH(HAS_LCD_MENU, AUTO_BED_LEVELING_UBL)
67
       if (ubl.lcd_map_control) {
67
       if (ubl.lcd_map_control) {
68
         ubl.lcd_map_control = false;
68
         ubl.lcd_map_control = false;
69
         ui.defer_status_screen(false);
69
         ui.defer_status_screen(false);

+ 2
- 2
Marlin/src/gcode/feature/digipot/M907-M910.cpp Wyświetl plik

22
 
22
 
23
 #include "../../../inc/MarlinConfig.h"
23
 #include "../../../inc/MarlinConfig.h"
24
 
24
 
25
-#if HAS_DIGIPOTSS || HAS_MOTOR_CURRENT_PWM || HAS_I2C_DIGIPOT || ENABLED(DAC_STEPPER_CURRENT)
25
+#if ANY(HAS_DIGIPOTSS, HAS_MOTOR_CURRENT_PWM, HAS_I2C_DIGIPOT, DAC_STEPPER_CURRENT)
26
 
26
 
27
 #include "../../gcode.h"
27
 #include "../../gcode.h"
28
 
28
 
80
   #endif
80
   #endif
81
 }
81
 }
82
 
82
 
83
-#if HAS_DIGIPOTSS || ENABLED(DAC_STEPPER_CURRENT)
83
+#if EITHER(HAS_DIGIPOTSS, DAC_STEPPER_CURRENT)
84
 
84
 
85
   /**
85
   /**
86
    * M908: Control digital trimpot directly (M908 P<pin> S<current>)
86
    * M908: Control digital trimpot directly (M908 P<pin> S<current>)

+ 5
- 5
Marlin/src/gcode/gcode.cpp Wyświetl plik

70
   | (ar_init.e ? _BV(REL_E) : 0)
70
   | (ar_init.e ? _BV(REL_E) : 0)
71
 );
71
 );
72
 
72
 
73
-#if HAS_AUTO_REPORTING || ENABLED(HOST_KEEPALIVE_FEATURE)
73
+#if EITHER(HAS_AUTO_REPORTING, HOST_KEEPALIVE_FEATURE)
74
   bool GcodeSuite::autoreport_paused; // = false
74
   bool GcodeSuite::autoreport_paused; // = false
75
 #endif
75
 #endif
76
 
76
 
202
  * When G29_RETRY_AND_RECOVER is enabled, call G29() in
202
  * When G29_RETRY_AND_RECOVER is enabled, call G29() in
203
  * a loop with recovery and retry handling.
203
  * a loop with recovery and retry handling.
204
  */
204
  */
205
-#if HAS_LEVELING && ENABLED(G29_RETRY_AND_RECOVER)
205
+#if BOTH(HAS_LEVELING, G29_RETRY_AND_RECOVER)
206
 
206
 
207
   #ifndef G29_MAX_RETRIES
207
   #ifndef G29_MAX_RETRIES
208
     #define G29_MAX_RETRIES 0
208
     #define G29_MAX_RETRIES 0
504
         case 191: M191(); break;                                  // M191: Wait for chamber temperature to reach target
504
         case 191: M191(); break;                                  // M191: Wait for chamber temperature to reach target
505
       #endif
505
       #endif
506
 
506
 
507
-      #if ENABLED(AUTO_REPORT_TEMPERATURES) && HAS_TEMP_SENSOR
507
+      #if BOTH(AUTO_REPORT_TEMPERATURES, HAS_TEMP_SENSOR)
508
         case 155: M155(); break;                                  // M155: Set temperature auto-report interval
508
         case 155: M155(); break;                                  // M155: Set temperature auto-report interval
509
       #endif
509
       #endif
510
 
510
 
792
         case 900: M900(); break;                                  // M900: Set advance K factor.
792
         case 900: M900(); break;                                  // M900: Set advance K factor.
793
       #endif
793
       #endif
794
 
794
 
795
-      #if HAS_DIGIPOTSS || HAS_MOTOR_CURRENT_PWM || HAS_I2C_DIGIPOT || ENABLED(DAC_STEPPER_CURRENT)
795
+      #if ANY(HAS_DIGIPOTSS, HAS_MOTOR_CURRENT_PWM, HAS_I2C_DIGIPOT, DAC_STEPPER_CURRENT)
796
         case 907: M907(); break;                                  // M907: Set digital trimpot motor current using axis codes.
796
         case 907: M907(); break;                                  // M907: Set digital trimpot motor current using axis codes.
797
-        #if HAS_DIGIPOTSS || ENABLED(DAC_STEPPER_CURRENT)
797
+        #if EITHER(HAS_DIGIPOTSS, DAC_STEPPER_CURRENT)
798
           case 908: M908(); break;                                // M908: Control digital trimpot directly.
798
           case 908: M908(); break;                                // M908: Control digital trimpot directly.
799
           #if ENABLED(DAC_STEPPER_CURRENT)
799
           #if ENABLED(DAC_STEPPER_CURRENT)
800
             case 909: M909(); break;                              // M909: Print digipot/DAC current value
800
             case 909: M909(); break;                              // M909: Print digipot/DAC current value

+ 4
- 4
Marlin/src/gcode/gcode.h Wyświetl plik

351
     process_subcommands_now_P(G28_STR);
351
     process_subcommands_now_P(G28_STR);
352
   }
352
   }
353
 
353
 
354
-  #if HAS_AUTO_REPORTING || ENABLED(HOST_KEEPALIVE_FEATURE)
354
+  #if EITHER(HAS_AUTO_REPORTING, HOST_KEEPALIVE_FEATURE)
355
     static bool autoreport_paused;
355
     static bool autoreport_paused;
356
     static inline bool set_autoreport_paused(const bool p) {
356
     static inline bool set_autoreport_paused(const bool p) {
357
       const bool was = autoreport_paused;
357
       const bool was = autoreport_paused;
610
 
610
 
611
   TERN_(HAS_COLOR_LEDS, static void M150());
611
   TERN_(HAS_COLOR_LEDS, static void M150());
612
 
612
 
613
-  #if ENABLED(AUTO_REPORT_TEMPERATURES) && HAS_TEMP_SENSOR
613
+  #if BOTH(AUTO_REPORT_TEMPERATURES, HAS_TEMP_SENSOR)
614
     static void M155();
614
     static void M155();
615
   #endif
615
   #endif
616
 
616
 
812
     static void M918();
812
     static void M918();
813
   #endif
813
   #endif
814
 
814
 
815
-  #if HAS_DIGIPOTSS || HAS_MOTOR_CURRENT_PWM || HAS_I2C_DIGIPOT || ENABLED(DAC_STEPPER_CURRENT)
815
+  #if ANY(HAS_DIGIPOTSS, HAS_MOTOR_CURRENT_PWM, HAS_I2C_DIGIPOT, DAC_STEPPER_CURRENT)
816
     static void M907();
816
     static void M907();
817
-    #if HAS_DIGIPOTSS || ENABLED(DAC_STEPPER_CURRENT)
817
+    #if EITHER(HAS_DIGIPOTSS, DAC_STEPPER_CURRENT)
818
       static void M908();
818
       static void M908();
819
       #if ENABLED(DAC_STEPPER_CURRENT)
819
       #if ENABLED(DAC_STEPPER_CURRENT)
820
         static void M909();
820
         static void M909();

+ 1
- 1
Marlin/src/gcode/temp/M155.cpp Wyświetl plik

22
 
22
 
23
 #include "../../inc/MarlinConfig.h"
23
 #include "../../inc/MarlinConfig.h"
24
 
24
 
25
-#if ENABLED(AUTO_REPORT_TEMPERATURES) && HAS_TEMP_SENSOR
25
+#if BOTH(AUTO_REPORT_TEMPERATURES, HAS_TEMP_SENSOR)
26
 
26
 
27
 #include "../gcode.h"
27
 #include "../gcode.h"
28
 #include "../../module/temperature.h"
28
 #include "../../module/temperature.h"

+ 5
- 5
Marlin/src/inc/Conditionals_post.h Wyświetl plik

31
 #endif
31
 #endif
32
 
32
 
33
 // Linear advance uses Jerk since E is an isolated axis
33
 // Linear advance uses Jerk since E is an isolated axis
34
-#if HAS_JUNCTION_DEVIATION && ENABLED(LIN_ADVANCE)
34
+#if BOTH(HAS_JUNCTION_DEVIATION, LIN_ADVANCE)
35
   #define HAS_LINEAR_E_JERK 1
35
   #define HAS_LINEAR_E_JERK 1
36
 #endif
36
 #endif
37
 
37
 
1653
   #define HAS_TEMP_ADC_CHAMBER 1
1653
   #define HAS_TEMP_ADC_CHAMBER 1
1654
 #endif
1654
 #endif
1655
 
1655
 
1656
-#if HOTENDS && (HAS_TEMP_ADC_0 || ENABLED(HEATER_0_USES_MAX6675))
1656
+#if HOTENDS && EITHER(HAS_TEMP_ADC_0, HEATER_0_USES_MAX6675)
1657
   #define HAS_TEMP_HOTEND 1
1657
   #define HAS_TEMP_HOTEND 1
1658
 #endif
1658
 #endif
1659
 #define HAS_TEMP_BED        HAS_TEMP_ADC_BED
1659
 #define HAS_TEMP_BED        HAS_TEMP_ADC_BED
1730
 #endif
1730
 #endif
1731
 
1731
 
1732
 // Thermal protection
1732
 // Thermal protection
1733
-#if HAS_HEATED_BED && ENABLED(THERMAL_PROTECTION_BED)
1733
+#if BOTH(HAS_HEATED_BED, THERMAL_PROTECTION_BED)
1734
   #define HAS_THERMALLY_PROTECTED_BED 1
1734
   #define HAS_THERMALLY_PROTECTED_BED 1
1735
 #endif
1735
 #endif
1736
 #if ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0
1736
 #if ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0
1739
 #if HAS_THERMALLY_PROTECTED_BED && WATCH_BED_TEMP_PERIOD > 0
1739
 #if HAS_THERMALLY_PROTECTED_BED && WATCH_BED_TEMP_PERIOD > 0
1740
   #define WATCH_BED 1
1740
   #define WATCH_BED 1
1741
 #endif
1741
 #endif
1742
-#if HAS_HEATED_CHAMBER && ENABLED(THERMAL_PROTECTION_CHAMBER) && WATCH_CHAMBER_TEMP_PERIOD > 0
1742
+#if BOTH(HAS_HEATED_CHAMBER, THERMAL_PROTECTION_CHAMBER) && WATCH_CHAMBER_TEMP_PERIOD > 0
1743
   #define WATCH_CHAMBER 1
1743
   #define WATCH_CHAMBER 1
1744
 #endif
1744
 #endif
1745
 #if  (ENABLED(THERMAL_PROTECTION_HOTENDS) || !EXTRUDERS) \
1745
 #if  (ENABLED(THERMAL_PROTECTION_HOTENDS) || !EXTRUDERS) \
2142
  * Bed Probe dependencies
2142
  * Bed Probe dependencies
2143
  */
2143
  */
2144
 #if HAS_BED_PROBE
2144
 #if HAS_BED_PROBE
2145
-  #if ENABLED(ENDSTOPPULLUPS) && HAS_Z_MIN_PROBE_PIN
2145
+  #if BOTH(ENDSTOPPULLUPS, HAS_Z_MIN_PROBE_PIN)
2146
     #define ENDSTOPPULLUP_ZMIN_PROBE
2146
     #define ENDSTOPPULLUP_ZMIN_PROBE
2147
   #endif
2147
   #endif
2148
   #ifndef Z_PROBE_OFFSET_RANGE_MIN
2148
   #ifndef Z_PROBE_OFFSET_RANGE_MIN

+ 4
- 4
Marlin/src/inc/SanityCheck.h Wyświetl plik

662
   #elif PROGRESS_MSG_EXPIRE < 0
662
   #elif PROGRESS_MSG_EXPIRE < 0
663
     #error "PROGRESS_MSG_EXPIRE must be greater than or equal to 0."
663
     #error "PROGRESS_MSG_EXPIRE must be greater than or equal to 0."
664
   #endif
664
   #endif
665
-#elif ENABLED(LCD_SET_PROGRESS_MANUALLY) && !HAS_GRAPHICAL_LCD && DISABLED(EXTENSIBLE_UI)
665
+#elif ENABLED(LCD_SET_PROGRESS_MANUALLY) && NONE(HAS_GRAPHICAL_LCD, EXTENSIBLE_UI)
666
   #error "LCD_SET_PROGRESS_MANUALLY requires LCD_PROGRESS_BAR, Graphical LCD, or EXTENSIBLE_UI."
666
   #error "LCD_SET_PROGRESS_MANUALLY requires LCD_PROGRESS_BAR, Graphical LCD, or EXTENSIBLE_UI."
667
 #endif
667
 #endif
668
 
668
 
673
 /**
673
 /**
674
  * Custom Boot and Status screens
674
  * Custom Boot and Status screens
675
  */
675
  */
676
-#if ENABLED(SHOW_CUSTOM_BOOTSCREEN) && !(HAS_GRAPHICAL_LCD || ENABLED(TOUCH_UI_FTDI_EVE))
676
+#if ENABLED(SHOW_CUSTOM_BOOTSCREEN) && NONE(HAS_GRAPHICAL_LCD, TOUCH_UI_FTDI_EVE)
677
   #error "SHOW_CUSTOM_BOOTSCREEN requires Graphical LCD or TOUCH_UI_FTDI_EVE."
677
   #error "SHOW_CUSTOM_BOOTSCREEN requires Graphical LCD or TOUCH_UI_FTDI_EVE."
678
 #elif ENABLED(CUSTOM_STATUS_SCREEN_IMAGE) && !HAS_GRAPHICAL_LCD
678
 #elif ENABLED(CUSTOM_STATUS_SCREEN_IMAGE) && !HAS_GRAPHICAL_LCD
679
   #error "CUSTOM_STATUS_SCREEN_IMAGE requires a Graphical LCD."
679
   #error "CUSTOM_STATUS_SCREEN_IMAGE requires a Graphical LCD."
1391
   #error "G26_MESH_VALIDATION requires MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, or AUTO_BED_LEVELING_UBL."
1391
   #error "G26_MESH_VALIDATION requires MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, or AUTO_BED_LEVELING_UBL."
1392
 #endif
1392
 #endif
1393
 
1393
 
1394
-#if ENABLED(MESH_EDIT_GFX_OVERLAY) && !(ENABLED(AUTO_BED_LEVELING_UBL) && HAS_GRAPHICAL_LCD)
1394
+#if ENABLED(MESH_EDIT_GFX_OVERLAY) && !BOTH(AUTO_BED_LEVELING_UBL, HAS_GRAPHICAL_LCD)
1395
   #error "MESH_EDIT_GFX_OVERLAY requires AUTO_BED_LEVELING_UBL and a Graphical LCD."
1395
   #error "MESH_EDIT_GFX_OVERLAY requires AUTO_BED_LEVELING_UBL and a Graphical LCD."
1396
 #endif
1396
 #endif
1397
 
1397
 
1599
   #error "MAX6675_SS_PIN (required for TEMP_SENSOR_0) not defined for this board."
1599
   #error "MAX6675_SS_PIN (required for TEMP_SENSOR_0) not defined for this board."
1600
 #elif HOTENDS && !HAS_TEMP_HOTEND
1600
 #elif HOTENDS && !HAS_TEMP_HOTEND
1601
   #error "TEMP_0_PIN (required for TEMP_SENSOR_0) not defined for this board."
1601
   #error "TEMP_0_PIN (required for TEMP_SENSOR_0) not defined for this board."
1602
-#elif (HAS_MULTI_HOTEND || ENABLED(HEATERS_PARALLEL)) && !HAS_HEATER_1
1602
+#elif EITHER(HAS_MULTI_HOTEND, HEATERS_PARALLEL) && !HAS_HEATER_1
1603
   #error "HEATER_1_PIN not defined for this board."
1603
   #error "HEATER_1_PIN not defined for this board."
1604
 #endif
1604
 #endif
1605
 
1605
 

+ 2
- 2
Marlin/src/lcd/HD44780/ultralcd_HD44780.cpp Wyświetl plik

275
 
275
 
276
   #endif // LCD_PROGRESS_BAR
276
   #endif // LCD_PROGRESS_BAR
277
 
277
 
278
-  #if ENABLED(SDSUPPORT) && HAS_LCD_MENU
278
+  #if BOTH(SDSUPPORT, HAS_LCD_MENU)
279
 
279
 
280
     // CHARSET_MENU
280
     // CHARSET_MENU
281
     const static PROGMEM byte refresh[8] = {
281
     const static PROGMEM byte refresh[8] = {
325
       #endif
325
       #endif
326
         {
326
         {
327
           createChar_P(LCD_STR_UPLEVEL[0], uplevel);
327
           createChar_P(LCD_STR_UPLEVEL[0], uplevel);
328
-          #if ENABLED(SDSUPPORT) && HAS_LCD_MENU
328
+          #if BOTH(SDSUPPORT, HAS_LCD_MENU)
329
             // SD Card sub-menu special characters
329
             // SD Card sub-menu special characters
330
             createChar_P(LCD_STR_REFRESH[0], refresh);
330
             createChar_P(LCD_STR_REFRESH[0], refresh);
331
             createChar_P(LCD_STR_FOLDER[0], folder);
331
             createChar_P(LCD_STR_FOLDER[0], folder);

+ 5
- 5
Marlin/src/lcd/dogm/dogm_Statusscreen.h Wyświetl plik

865
 // Can also be overridden in Configuration_adv.h
865
 // Can also be overridden in Configuration_adv.h
866
 // If you can afford it, try the 3-frame fan animation!
866
 // If you can afford it, try the 3-frame fan animation!
867
 // Don't compile in the fan animation with no fan
867
 // Don't compile in the fan animation with no fan
868
-#if !HAS_FAN0 || (HOTENDS == 5 || (HOTENDS == 4 && BED_OR_CHAMBER) || (ENABLED(STATUS_COMBINE_HEATERS) && HAS_HEATED_CHAMBER))
868
+#if !HAS_FAN0 || (HOTENDS == 5 || (HOTENDS == 4 && BED_OR_CHAMBER) || BOTH(STATUS_COMBINE_HEATERS, HAS_HEATED_CHAMBER))
869
   #undef STATUS_FAN_FRAMES
869
   #undef STATUS_FAN_FRAMES
870
 #elif !STATUS_FAN_FRAMES
870
 #elif !STATUS_FAN_FRAMES
871
   #define STATUS_FAN_FRAMES 2
871
   #define STATUS_FAN_FRAMES 2
1393
         ((STATUS_CHAMBER_WIDTH || STATUS_FAN_WIDTH  ||  STATUS_BED_WIDTH) && STATUS_HOTEND_BITMAPS == 4)
1393
         ((STATUS_CHAMBER_WIDTH || STATUS_FAN_WIDTH  ||  STATUS_BED_WIDTH) && STATUS_HOTEND_BITMAPS == 4)
1394
     #define STATUS_HEATERS_X 5
1394
     #define STATUS_HEATERS_X 5
1395
   #else
1395
   #else
1396
-    #if ENABLED(STATUS_COMBINE_HEATERS) && HAS_HEATED_BED && HOTENDS <= 4
1396
+    #if BOTH(STATUS_COMBINE_HEATERS, HAS_HEATED_BED) && HOTENDS <= 4
1397
       #define STATUS_HEATERS_X 5
1397
       #define STATUS_HEATERS_X 5
1398
     #else
1398
     #else
1399
       #define STATUS_HEATERS_X 8 // Like the included bitmaps
1399
       #define STATUS_HEATERS_X 8 // Like the included bitmaps
1752
 #if HOTENDS && ENABLED(STATUS_HOTEND_ANIM)
1752
 #if HOTENDS && ENABLED(STATUS_HOTEND_ANIM)
1753
   #define ANIM_HOTEND 1
1753
   #define ANIM_HOTEND 1
1754
 #endif
1754
 #endif
1755
-#if DO_DRAW_BED && ENABLED(STATUS_BED_ANIM)
1755
+#if BOTH(DO_DRAW_BED, STATUS_BED_ANIM)
1756
   #define ANIM_BED 1
1756
   #define ANIM_BED 1
1757
 #endif
1757
 #endif
1758
-#if DO_DRAW_CHAMBER && ENABLED(STATUS_CHAMBER_ANIM)
1758
+#if BOTH(DO_DRAW_CHAMBER, STATUS_CHAMBER_ANIM)
1759
   #define ANIM_CHAMBER 1
1759
   #define ANIM_CHAMBER 1
1760
 #endif
1760
 #endif
1761
-#if DO_DRAW_CUTTER && ENABLED(STATUS_CUTTER_ANIM)
1761
+#if BOTH(DO_DRAW_CUTTER, STATUS_CUTTER_ANIM)
1762
   #define ANIM_CUTTER 1
1762
   #define ANIM_CUTTER 1
1763
 #endif
1763
 #endif
1764
 #if ANIM_HOTEND || ANIM_BED || ANIM_CHAMBER || ANIM_CUTTER
1764
 #if ANIM_HOTEND || ANIM_BED || ANIM_CHAMBER || ANIM_CUTTER

+ 1
- 1
Marlin/src/lcd/dogm/status_screen_DOGM.cpp Wyświetl plik

142
     #elif ANIM_HOTEND && DISABLED(STATUS_HOTEND_INVERTED) && ENABLED(STATUS_HOTEND_NUMBERLESS)
142
     #elif ANIM_HOTEND && DISABLED(STATUS_HOTEND_INVERTED) && ENABLED(STATUS_HOTEND_NUMBERLESS)
143
       #define OFF_BMP(N) status_hotend_a_bmp
143
       #define OFF_BMP(N) status_hotend_a_bmp
144
       #define ON_BMP(N)  status_hotend_b_bmp
144
       #define ON_BMP(N)  status_hotend_b_bmp
145
-    #elif ANIM_HOTEND && ENABLED(STATUS_HOTEND_INVERTED)
145
+    #elif BOTH(ANIM_HOTEND, STATUS_HOTEND_INVERTED)
146
       #define OFF_BMP(N) status_hotend##N##_b_bmp
146
       #define OFF_BMP(N) status_hotend##N##_b_bmp
147
       #define ON_BMP(N)  status_hotend##N##_a_bmp
147
       #define ON_BMP(N)  status_hotend##N##_a_bmp
148
     #else
148
     #else

+ 2
- 2
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/advanced_settings_menu.cpp Wyświetl plik

38
   }
38
   }
39
 
39
 
40
     #ifdef TOUCH_UI_PORTRAIT
40
     #ifdef TOUCH_UI_PORTRAIT
41
-      #if HAS_CASE_LIGHT || ENABLED(SENSORLESS_HOMING)
41
+      #if EITHER(HAS_CASE_LIGHT, SENSORLESS_HOMING)
42
         #define GRID_ROWS 9
42
         #define GRID_ROWS 9
43
       #else
43
       #else
44
         #define GRID_ROWS 8
44
         #define GRID_ROWS 8
59
       #define BACKLASH_POS            BTN_POS(2,7), BTN_SIZE(1,1)
59
       #define BACKLASH_POS            BTN_POS(2,7), BTN_SIZE(1,1)
60
       #define CASE_LIGHT_POS          BTN_POS(1,8), BTN_SIZE(1,1)
60
       #define CASE_LIGHT_POS          BTN_POS(1,8), BTN_SIZE(1,1)
61
       #define TMC_HOMING_THRS_POS     BTN_POS(2,8), BTN_SIZE(1,1)
61
       #define TMC_HOMING_THRS_POS     BTN_POS(2,8), BTN_SIZE(1,1)
62
-      #if HAS_CASE_LIGHT || ENABLED(SENSORLESS_HOMING)
62
+      #if EITHER(HAS_CASE_LIGHT, SENSORLESS_HOMING)
63
         #define BACK_POS              BTN_POS(1,9), BTN_SIZE(2,1)
63
         #define BACK_POS              BTN_POS(1,9), BTN_SIZE(2,1)
64
       #else
64
       #else
65
         #define BACK_POS              BTN_POS(1,8), BTN_SIZE(2,1)
65
         #define BACK_POS              BTN_POS(1,8), BTN_SIZE(2,1)

+ 2
- 2
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bed_mesh_screen.cpp Wyświetl plik

21
 
21
 
22
 #include "../config.h"
22
 #include "../config.h"
23
 
23
 
24
-#if ENABLED(TOUCH_UI_FTDI_EVE) && HAS_MESH
24
+#if BOTH(TOUCH_UI_FTDI_EVE, HAS_MESH)
25
 
25
 
26
 #include "screens.h"
26
 #include "screens.h"
27
 #include "screen_data.h"
27
 #include "screen_data.h"
298
   BedMeshScreen::onMeshUpdate(x, y, 0);
298
   BedMeshScreen::onMeshUpdate(x, y, 0);
299
 }
299
 }
300
 
300
 
301
-#endif // TOUCH_UI_FTDI_EVE
301
+#endif // TOUCH_UI_FTDI_EVE && HAS_MESH

+ 1
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/junction_deviation_screen.cpp Wyświetl plik

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

+ 1
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/main_menu.cpp Wyświetl plik

137
     case 4:  GOTO_SCREEN(MoveAxisScreen);                             break;
137
     case 4:  GOTO_SCREEN(MoveAxisScreen);                             break;
138
     case 5:  injectCommands_P(PSTR("M84"));                           break;
138
     case 5:  injectCommands_P(PSTR("M84"));                           break;
139
     case 6:  GOTO_SCREEN(TemperatureScreen);                          break;
139
     case 6:  GOTO_SCREEN(TemperatureScreen);                          break;
140
-    #if ENABLED(TOUCH_UI_COCOA_PRESS) && HAS_CASE_LIGHT
140
+    #if BOTH(TOUCH_UI_COCOA_PRESS, HAS_CASE_LIGHT)
141
     case 7:  GOTO_SCREEN(CaseLightScreen);                            break;
141
     case 7:  GOTO_SCREEN(CaseLightScreen);                            break;
142
     #else
142
     #else
143
     case 7:  GOTO_SCREEN(ChangeFilamentScreen);                       break;
143
     case 7:  GOTO_SCREEN(ChangeFilamentScreen);                       break;

+ 1
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/nozzle_offsets_screen.cpp Wyświetl plik

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

+ 1
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/stepper_bump_sensitivity_screen.cpp Wyświetl plik

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

+ 1
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/stepper_current_screen.cpp Wyświetl plik

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

+ 1
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/z_offset_screen.cpp Wyświetl plik

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

+ 6
- 4
Marlin/src/lcd/menu/menu_advanced.cpp Wyświetl plik

235
 
235
 
236
 #if HAS_HOTEND
236
 #if HAS_HOTEND
237
   DEFINE_PIDTEMP_FUNCS(0);
237
   DEFINE_PIDTEMP_FUNCS(0);
238
-  #if HAS_MULTI_HOTEND && ENABLED(PID_PARAMS_PER_HOTEND)
238
+  #if BOTH(HAS_MULTI_HOTEND, PID_PARAMS_PER_HOTEND)
239
     REPEAT_S(1, HOTENDS, DEFINE_PIDTEMP_FUNCS)
239
     REPEAT_S(1, HOTENDS, DEFINE_PIDTEMP_FUNCS)
240
   #endif
240
   #endif
241
 #endif
241
 #endif
242
 
242
 
243
-#define SHOW_MENU_ADVANCED_TEMPERATURE ((ENABLED(AUTOTEMP) && HAS_TEMP_HOTEND) || EITHER(PID_AUTOTUNE_MENU, PID_EDIT_MENU))
243
+#if BOTH(AUTOTEMP, HAS_TEMP_HOTEND) || EITHER(PID_AUTOTUNE_MENU, PID_EDIT_MENU)
244
+  #define SHOW_MENU_ADVANCED_TEMPERATURE 1
245
+#endif
244
 
246
 
245
 //
247
 //
246
 // Advanced Settings > Temperature
248
 // Advanced Settings > Temperature
253
     //
255
     //
254
     // Autotemp, Min, Max, Fact
256
     // Autotemp, Min, Max, Fact
255
     //
257
     //
256
-    #if ENABLED(AUTOTEMP) && HAS_TEMP_HOTEND
258
+    #if BOTH(AUTOTEMP, HAS_TEMP_HOTEND)
257
       EDIT_ITEM(bool, MSG_AUTOTEMP, &planner.autotemp_enabled);
259
       EDIT_ITEM(bool, MSG_AUTOTEMP, &planner.autotemp_enabled);
258
       EDIT_ITEM(float3, MSG_MIN, &planner.autotemp_min, 0, float(HEATER_0_MAXTEMP) - 15);
260
       EDIT_ITEM(float3, MSG_MIN, &planner.autotemp_min, 0, float(HEATER_0_MAXTEMP) - 15);
259
       EDIT_ITEM(float3, MSG_MAX, &planner.autotemp_max, 0, float(HEATER_0_MAXTEMP) - 15);
261
       EDIT_ITEM(float3, MSG_MAX, &planner.autotemp_max, 0, float(HEATER_0_MAXTEMP) - 15);
308
     #endif
310
     #endif
309
 
311
 
310
     PID_EDIT_MENU_ITEMS(0);
312
     PID_EDIT_MENU_ITEMS(0);
311
-    #if HAS_MULTI_HOTEND && ENABLED(PID_PARAMS_PER_HOTEND)
313
+    #if BOTH(HAS_MULTI_HOTEND, PID_PARAMS_PER_HOTEND)
312
       REPEAT_S(1, HOTENDS, PID_EDIT_MENU_ITEMS)
314
       REPEAT_S(1, HOTENDS, PID_EDIT_MENU_ITEMS)
313
     #endif
315
     #endif
314
 
316
 

+ 1
- 1
Marlin/src/lcd/menu/menu_backlash.cpp Wyświetl plik

26
 
26
 
27
 #include "../../inc/MarlinConfigPre.h"
27
 #include "../../inc/MarlinConfigPre.h"
28
 
28
 
29
-#if HAS_LCD_MENU && ENABLED(BACKLASH_GCODE)
29
+#if BOTH(HAS_LCD_MENU, BACKLASH_GCODE)
30
 
30
 
31
 #include "menu.h"
31
 #include "menu.h"
32
 
32
 

+ 1
- 1
Marlin/src/lcd/menu/menu_bed_corners.cpp Wyświetl plik

26
 
26
 
27
 #include "../../inc/MarlinConfigPre.h"
27
 #include "../../inc/MarlinConfigPre.h"
28
 
28
 
29
-#if HAS_LCD_MENU && ENABLED(LEVEL_BED_CORNERS)
29
+#if BOTH(HAS_LCD_MENU, LEVEL_BED_CORNERS)
30
 
30
 
31
 #include "menu.h"
31
 #include "menu.h"
32
 #include "../../module/motion.h"
32
 #include "../../module/motion.h"

+ 1
- 1
Marlin/src/lcd/menu/menu_cancelobject.cpp Wyświetl plik

26
 
26
 
27
 #include "../../inc/MarlinConfigPre.h"
27
 #include "../../inc/MarlinConfigPre.h"
28
 
28
 
29
-#if HAS_LCD_MENU && ENABLED(CANCEL_OBJECTS)
29
+#if BOTH(HAS_LCD_MENU, CANCEL_OBJECTS)
30
 
30
 
31
 #include "menu.h"
31
 #include "menu.h"
32
 #include "menu_addon.h"
32
 #include "menu_addon.h"

+ 2
- 4
Marlin/src/lcd/menu/menu_custom.cpp Wyświetl plik

26
 
26
 
27
 #include "../../inc/MarlinConfigPre.h"
27
 #include "../../inc/MarlinConfigPre.h"
28
 
28
 
29
-#if HAS_LCD_MENU && ENABLED(CUSTOM_USER_MENUS)
29
+#if BOTH(HAS_LCD_MENU, CUSTOM_USER_MENUS)
30
 
30
 
31
 #include "menu.h"
31
 #include "menu.h"
32
 #include "../../gcode/queue.h"
32
 #include "../../gcode/queue.h"
39
 
39
 
40
 void _lcd_user_gcode(PGM_P const cmd) {
40
 void _lcd_user_gcode(PGM_P const cmd) {
41
   queue.inject_P(cmd);
41
   queue.inject_P(cmd);
42
-  #if ENABLED(USER_SCRIPT_AUDIBLE_FEEDBACK) && HAS_BUZZER
43
-    ui.completion_feedback();
44
-  #endif
42
+  TERN_(USER_SCRIPT_AUDIBLE_FEEDBACK, ui.completion_feedback());
45
   TERN_(USER_SCRIPT_RETURN, ui.return_to_status());
43
   TERN_(USER_SCRIPT_RETURN, ui.return_to_status());
46
 }
44
 }
47
 
45
 

+ 1
- 1
Marlin/src/lcd/menu/menu_filament.cpp Wyświetl plik

26
 
26
 
27
 #include "../../inc/MarlinConfigPre.h"
27
 #include "../../inc/MarlinConfigPre.h"
28
 
28
 
29
-#if HAS_LCD_MENU && ENABLED(ADVANCED_PAUSE_FEATURE)
29
+#if BOTH(HAS_LCD_MENU, ADVANCED_PAUSE_FEATURE)
30
 
30
 
31
 #include "menu.h"
31
 #include "menu.h"
32
 #include "../../module/temperature.h"
32
 #include "../../module/temperature.h"

+ 1
- 1
Marlin/src/lcd/menu/menu_info.cpp Wyświetl plik

26
 
26
 
27
 #include "../../inc/MarlinConfigPre.h"
27
 #include "../../inc/MarlinConfigPre.h"
28
 
28
 
29
-#if HAS_LCD_MENU && ENABLED(LCD_INFO_MENU)
29
+#if BOTH(HAS_LCD_MENU, LCD_INFO_MENU)
30
 
30
 
31
 #include "menu.h"
31
 #include "menu.h"
32
 
32
 

+ 1
- 1
Marlin/src/lcd/menu/menu_job_recovery.cpp Wyświetl plik

26
 
26
 
27
 #include "../../inc/MarlinConfigPre.h"
27
 #include "../../inc/MarlinConfigPre.h"
28
 
28
 
29
-#if HAS_LCD_MENU && ENABLED(POWER_LOSS_RECOVERY)
29
+#if BOTH(HAS_LCD_MENU, POWER_LOSS_RECOVERY)
30
 
30
 
31
 #include "menu.h"
31
 #include "menu.h"
32
 #include "../../gcode/queue.h"
32
 #include "../../gcode/queue.h"

+ 1
- 1
Marlin/src/lcd/menu/menu_led.cpp Wyświetl plik

26
 
26
 
27
 #include "../../inc/MarlinConfigPre.h"
27
 #include "../../inc/MarlinConfigPre.h"
28
 
28
 
29
-#if HAS_LCD_MENU && ENABLED(LED_CONTROL_MENU)
29
+#if BOTH(HAS_LCD_MENU, LED_CONTROL_MENU)
30
 
30
 
31
 #include "menu.h"
31
 #include "menu.h"
32
 #include "../../feature/leds/leds.h"
32
 #include "../../feature/leds/leds.h"

+ 1
- 1
Marlin/src/lcd/menu/menu_main.cpp Wyświetl plik

203
       GCODES_ITEM(MSG_SWITCH_PS_ON, PSTR("M80"));
203
       GCODES_ITEM(MSG_SWITCH_PS_ON, PSTR("M80"));
204
   #endif
204
   #endif
205
 
205
 
206
-  #if HAS_ENCODER_WHEEL && ENABLED(SDSUPPORT)
206
+  #if BOTH(HAS_ENCODER_WHEEL, SDSUPPORT)
207
 
207
 
208
     // *** IF THIS SECTION IS CHANGED, REPRODUCE ABOVE ***
208
     // *** IF THIS SECTION IS CHANGED, REPRODUCE ABOVE ***
209
 
209
 

+ 1
- 1
Marlin/src/lcd/menu/menu_media.cpp Wyświetl plik

26
 
26
 
27
 #include "../../inc/MarlinConfigPre.h"
27
 #include "../../inc/MarlinConfigPre.h"
28
 
28
 
29
-#if HAS_LCD_MENU && ENABLED(SDSUPPORT)
29
+#if BOTH(HAS_LCD_MENU, SDSUPPORT)
30
 
30
 
31
 #include "menu.h"
31
 #include "menu.h"
32
 #include "../../sd/cardreader.h"
32
 #include "../../sd/cardreader.h"

+ 1
- 1
Marlin/src/lcd/menu/menu_mixer.cpp Wyświetl plik

26
 
26
 
27
 #include "../../inc/MarlinConfigPre.h"
27
 #include "../../inc/MarlinConfigPre.h"
28
 
28
 
29
-#if HAS_LCD_MENU && ENABLED(MIXING_EXTRUDER)
29
+#if BOTH(HAS_LCD_MENU, MIXING_EXTRUDER)
30
 
30
 
31
 #include "menu.h"
31
 #include "menu.h"
32
 #include "menu_addon.h"
32
 #include "menu_addon.h"

+ 2
- 2
Marlin/src/lcd/menu/menu_mmu2.cpp Wyświetl plik

22
 
22
 
23
 #include "../../inc/MarlinConfig.h"
23
 #include "../../inc/MarlinConfig.h"
24
 
24
 
25
-#if HAS_LCD_MENU && ENABLED(MMU2_MENUS)
25
+#if BOTH(HAS_LCD_MENU, MMU2_MENUS)
26
 
26
 
27
 #include "../../feature/mmu2/mmu2.h"
27
 #include "../../feature/mmu2/mmu2.h"
28
 #include "menu_mmu2.h"
28
 #include "menu_mmu2.h"
171
   return currentTool;
171
   return currentTool;
172
 }
172
 }
173
 
173
 
174
-#endif //  HAS_LCD_MENU && ENABLED(PRUSA_MMU2_MENUS)
174
+#endif // HAS_LCD_MENU && MMU2_MENUS

+ 1
- 1
Marlin/src/lcd/menu/menu_motion.cpp Wyświetl plik

257
   START_MENU();
257
   START_MENU();
258
   BACK_ITEM(MSG_MOTION);
258
   BACK_ITEM(MSG_MOTION);
259
 
259
 
260
-  #if HAS_SOFTWARE_ENDSTOPS && ENABLED(SOFT_ENDSTOPS_MENU_ITEM)
260
+  #if BOTH(HAS_SOFTWARE_ENDSTOPS, SOFT_ENDSTOPS_MENU_ITEM)
261
     EDIT_ITEM(bool, MSG_LCD_SOFT_ENDSTOPS, &soft_endstops_enabled);
261
     EDIT_ITEM(bool, MSG_LCD_SOFT_ENDSTOPS, &soft_endstops_enabled);
262
   #endif
262
   #endif
263
 
263
 

+ 1
- 1
Marlin/src/lcd/menu/menu_ubl.cpp Wyświetl plik

26
 
26
 
27
 #include "../../inc/MarlinConfigPre.h"
27
 #include "../../inc/MarlinConfigPre.h"
28
 
28
 
29
-#if HAS_LCD_MENU && ENABLED(AUTO_BED_LEVELING_UBL)
29
+#if BOTH(HAS_LCD_MENU, AUTO_BED_LEVELING_UBL)
30
 
30
 
31
 #include "menu.h"
31
 #include "menu.h"
32
 #include "../../gcode/gcode.h"
32
 #include "../../gcode/gcode.h"

+ 8
- 12
Marlin/src/lcd/ultralcd.cpp Wyświetl plik

60
   constexpr uint8_t MAX_MESSAGE_LENGTH = 63;
60
   constexpr uint8_t MAX_MESSAGE_LENGTH = 63;
61
 #endif
61
 #endif
62
 
62
 
63
-#if HAS_SPI_LCD || ENABLED(EXTENSIBLE_UI)
63
+#if EITHER(HAS_SPI_LCD, EXTENSIBLE_UI)
64
   uint8_t MarlinUI::alert_level; // = 0
64
   uint8_t MarlinUI::alert_level; // = 0
65
   char MarlinUI::status_message[MAX_MESSAGE_LENGTH + 1];
65
   char MarlinUI::status_message[MAX_MESSAGE_LENGTH + 1];
66
 #endif
66
 #endif
366
 ///////////// Keypad Handling //////////////
366
 ///////////// Keypad Handling //////////////
367
 ////////////////////////////////////////////
367
 ////////////////////////////////////////////
368
 
368
 
369
-#if ENABLED(REPRAPWORLD_KEYPAD) && HAS_ENCODER_ACTION
369
+#if BOTH(REPRAPWORLD_KEYPAD, HAS_ENCODER_ACTION)
370
 
370
 
371
   volatile uint8_t MarlinUI::keypad_buttons;
371
   volatile uint8_t MarlinUI::keypad_buttons;
372
 
372
 
566
     if (old_frm != new_frm) {
566
     if (old_frm != new_frm) {
567
       feedrate_percentage = new_frm;
567
       feedrate_percentage = new_frm;
568
       encoderPosition = 0;
568
       encoderPosition = 0;
569
-      #if HAS_BUZZER && ENABLED(BEEP_ON_FEEDRATE_CHANGE)
569
+      #if BOTH(HAS_BUZZER, BEEP_ON_FEEDRATE_CHANGE)
570
         static millis_t next_beep;
570
         static millis_t next_beep;
571
         #ifndef GOT_MS
571
         #ifndef GOT_MS
572
           const millis_t ms = millis();
572
           const millis_t ms = millis();
827
       if (encoderPastThreshold || lcd_clicked) {
827
       if (encoderPastThreshold || lcd_clicked) {
828
         if (encoderPastThreshold) {
828
         if (encoderPastThreshold) {
829
 
829
 
830
-          #if HAS_LCD_MENU && ENABLED(ENCODER_RATE_MULTIPLIER)
830
+          #if BOTH(HAS_LCD_MENU, ENCODER_RATE_MULTIPLIER)
831
 
831
 
832
             int32_t encoderMultiplier = 1;
832
             int32_t encoderMultiplier = 1;
833
 
833
 
888
       refresh(LCDVIEW_REDRAW_NOW);
888
       refresh(LCDVIEW_REDRAW_NOW);
889
     }
889
     }
890
 
890
 
891
-    #if HAS_LCD_MENU && ENABLED(SCROLL_LONG_FILENAMES)
891
+    #if BOTH(HAS_LCD_MENU, SCROLL_LONG_FILENAMES)
892
       // If scrolling of long file names is enabled and we are in the sd card menu,
892
       // If scrolling of long file names is enabled and we are in the sd card menu,
893
       // cause a refresh to occur until all the text has scrolled into view.
893
       // cause a refresh to occur until all the text has scrolled into view.
894
       if (currentScreen == menu_media && !lcd_status_update_delay--) {
894
       if (currentScreen == menu_media && !lcd_status_update_delay--) {
1134
           #if HAS_SLOW_BUTTONS
1134
           #if HAS_SLOW_BUTTONS
1135
             | slow_buttons
1135
             | slow_buttons
1136
           #endif
1136
           #endif
1137
-          #if ENABLED(TOUCH_BUTTONS) && HAS_ENCODER_ACTION
1138
-            | (touch_buttons
1139
-              #if HAS_ENCODER_WHEEL
1140
-                & (~(EN_A | EN_B))
1141
-              #endif
1142
-            )
1137
+          #if BOTH(TOUCH_BUTTONS, HAS_ENCODER_ACTION)
1138
+            | (touch_buttons & TERN_(HAS_ENCODER_WHEEL, & ~(EN_A | EN_B)))
1143
           #endif
1139
           #endif
1144
         );
1140
         );
1145
 
1141
 
1261
       next_filament_display = ms + 5000UL; // Show status message for 5s
1257
       next_filament_display = ms + 5000UL; // Show status message for 5s
1262
     #endif
1258
     #endif
1263
 
1259
 
1264
-    #if HAS_SPI_LCD && ENABLED(STATUS_MESSAGE_SCROLLING)
1260
+    #if BOTH(HAS_SPI_LCD, STATUS_MESSAGE_SCROLLING)
1265
       status_scroll_offset = 0;
1261
       status_scroll_offset = 0;
1266
     #endif
1262
     #endif
1267
 
1263
 

+ 1
- 1
Marlin/src/lcd/ultralcd.h Wyświetl plik

27
   #include "../libs/buzzer.h"
27
   #include "../libs/buzzer.h"
28
 #endif
28
 #endif
29
 
29
 
30
-#if HAS_LCD_MENU || ENABLED(ULTIPANEL_FEEDMULTIPLY)
30
+#if EITHER(HAS_LCD_MENU, ULTIPANEL_FEEDMULTIPLY)
31
   #define HAS_ENCODER_ACTION 1
31
   #define HAS_ENCODER_ACTION 1
32
 #endif
32
 #endif
33
 #if (!HAS_ADC_BUTTONS && ENABLED(NEWPANEL)) || BUTTONS_EXIST(EN1, EN2)
33
 #if (!HAS_ADC_BUTTONS && ENABLED(NEWPANEL)) || BUTTONS_EXIST(EN1, EN2)

+ 1
- 1
Marlin/src/module/configuration_store.cpp Wyświetl plik

3099
         HOTEND_LOOP() {
3099
         HOTEND_LOOP() {
3100
           CONFIG_ECHO_START();
3100
           CONFIG_ECHO_START();
3101
           SERIAL_ECHOPAIR_P(
3101
           SERIAL_ECHOPAIR_P(
3102
-            #if HAS_MULTI_HOTEND && ENABLED(PID_PARAMS_PER_HOTEND)
3102
+            #if BOTH(HAS_MULTI_HOTEND, PID_PARAMS_PER_HOTEND)
3103
               PSTR("  M301 E"), e,
3103
               PSTR("  M301 E"), e,
3104
               SP_P_STR
3104
               SP_P_STR
3105
             #else
3105
             #else

+ 6
- 6
Marlin/src/module/motion.cpp Wyświetl plik

639
 
639
 
640
       if (TERN0(DELTA, !all_axes_homed())) return;
640
       if (TERN0(DELTA, !all_axes_homed())) return;
641
 
641
 
642
-      #if HAS_HOTEND_OFFSET && ENABLED(DELTA)
642
+      #if BOTH(HAS_HOTEND_OFFSET, DELTA)
643
         // The effector center position will be the target minus the hotend offset.
643
         // The effector center position will be the target minus the hotend offset.
644
         const xy_pos_t offs = hotend_offset[active_extruder];
644
         const xy_pos_t offs = hotend_offset[active_extruder];
645
       #else
645
       #else
1287
     DEBUG_ECHOLNPGM(")");
1287
     DEBUG_ECHOLNPGM(")");
1288
   }
1288
   }
1289
 
1289
 
1290
-  #if HOMING_Z_WITH_PROBE && HAS_HEATED_BED && ENABLED(WAIT_FOR_BED_HEATER)
1290
+  #if ALL(HOMING_Z_WITH_PROBE, HAS_HEATED_BED, WAIT_FOR_BED_HEATER)
1291
     // Wait for bed to heat back up between probing points
1291
     // Wait for bed to heat back up between probing points
1292
     if (axis == Z_AXIS && distance < 0)
1292
     if (axis == Z_AXIS && distance < 0)
1293
       thermalManager.wait_for_bed_heating();
1293
       thermalManager.wait_for_bed_heating();
1578
   // Fast move towards endstop until triggered
1578
   // Fast move towards endstop until triggered
1579
   if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Home 1 Fast:");
1579
   if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Home 1 Fast:");
1580
 
1580
 
1581
-  #if HOMING_Z_WITH_PROBE && ENABLED(BLTOUCH)
1581
+  #if BOTH(HOMING_Z_WITH_PROBE, BLTOUCH)
1582
     if (axis == Z_AXIS && bltouch.deploy()) return; // The initial DEPLOY
1582
     if (axis == Z_AXIS && bltouch.deploy()) return; // The initial DEPLOY
1583
   #endif
1583
   #endif
1584
 
1584
 
1590
 
1590
 
1591
   do_homing_move(axis, 1.5f * max_length(TERN(DELTA, Z_AXIS, axis)) * axis_home_dir);
1591
   do_homing_move(axis, 1.5f * max_length(TERN(DELTA, Z_AXIS, axis)) * axis_home_dir);
1592
 
1592
 
1593
-  #if HOMING_Z_WITH_PROBE && ENABLED(BLTOUCH) && DISABLED(BLTOUCH_HS_MODE)
1593
+  #if BOTH(HOMING_Z_WITH_PROBE, BLTOUCH) && DISABLED(BLTOUCH_HS_MODE)
1594
     if (axis == Z_AXIS) bltouch.stow(); // Intermediate STOW (in LOW SPEED MODE)
1594
     if (axis == Z_AXIS) bltouch.stow(); // Intermediate STOW (in LOW SPEED MODE)
1595
   #endif
1595
   #endif
1596
 
1596
 
1613
     // Slow move towards endstop until triggered
1613
     // Slow move towards endstop until triggered
1614
     if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Home 2 Slow:");
1614
     if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Home 2 Slow:");
1615
 
1615
 
1616
-    #if HOMING_Z_WITH_PROBE && ENABLED(BLTOUCH) && DISABLED(BLTOUCH_HS_MODE)
1616
+    #if BOTH(HOMING_Z_WITH_PROBE, BLTOUCH) && DISABLED(BLTOUCH_HS_MODE)
1617
       if (axis == Z_AXIS && bltouch.deploy()) return; // Intermediate DEPLOY (in LOW SPEED MODE)
1617
       if (axis == Z_AXIS && bltouch.deploy()) return; // Intermediate DEPLOY (in LOW SPEED MODE)
1618
     #endif
1618
     #endif
1619
 
1619
 
1620
     do_homing_move(axis, 2 * bump, get_homing_bump_feedrate(axis));
1620
     do_homing_move(axis, 2 * bump, get_homing_bump_feedrate(axis));
1621
 
1621
 
1622
-    #if HOMING_Z_WITH_PROBE && ENABLED(BLTOUCH)
1622
+    #if BOTH(HOMING_Z_WITH_PROBE, BLTOUCH)
1623
       if (axis == Z_AXIS) bltouch.stow(); // The final STOW
1623
       if (axis == Z_AXIS) bltouch.stow(); // The final STOW
1624
     #endif
1624
     #endif
1625
   }
1625
   }

+ 1
- 1
Marlin/src/module/probe.cpp Wyświetl plik

441
 bool Probe::probe_down_to_z(const float z, const feedRate_t fr_mm_s) {
441
 bool Probe::probe_down_to_z(const float z, const feedRate_t fr_mm_s) {
442
   if (DEBUGGING(LEVELING)) DEBUG_POS(">>> Probe::probe_down_to_z", current_position);
442
   if (DEBUGGING(LEVELING)) DEBUG_POS(">>> Probe::probe_down_to_z", current_position);
443
 
443
 
444
-  #if HAS_HEATED_BED && ENABLED(WAIT_FOR_BED_HEATER)
444
+  #if BOTH(HAS_HEATED_BED, WAIT_FOR_BED_HEATER)
445
     thermalManager.wait_for_bed_heating();
445
     thermalManager.wait_for_bed_heating();
446
   #endif
446
   #endif
447
 
447
 

+ 3
- 3
Marlin/src/module/stepper.cpp Wyświetl plik

138
 
138
 
139
 // public:
139
 // public:
140
 
140
 
141
-#if HAS_EXTRA_ENDSTOPS || ENABLED(Z_STEPPER_AUTO_ALIGN)
141
+#if EITHER(HAS_EXTRA_ENDSTOPS, Z_STEPPER_AUTO_ALIGN)
142
   bool Stepper::separate_multi_axis = false;
142
   bool Stepper::separate_multi_axis = false;
143
 #endif
143
 #endif
144
 
144
 
2265
   TERN_(HAS_X2_DIR, X2_DIR_INIT());
2265
   TERN_(HAS_X2_DIR, X2_DIR_INIT());
2266
   #if HAS_Y_DIR
2266
   #if HAS_Y_DIR
2267
     Y_DIR_INIT();
2267
     Y_DIR_INIT();
2268
-    #if ENABLED(Y_DUAL_STEPPER_DRIVERS) && HAS_Y2_DIR
2268
+    #if BOTH(Y_DUAL_STEPPER_DRIVERS, HAS_Y2_DIR)
2269
       Y2_DIR_INIT();
2269
       Y2_DIR_INIT();
2270
     #endif
2270
     #endif
2271
   #endif
2271
   #endif
2318
   #if HAS_Y_ENABLE
2318
   #if HAS_Y_ENABLE
2319
     Y_ENABLE_INIT();
2319
     Y_ENABLE_INIT();
2320
     if (!Y_ENABLE_ON) Y_ENABLE_WRITE(HIGH);
2320
     if (!Y_ENABLE_ON) Y_ENABLE_WRITE(HIGH);
2321
-    #if ENABLED(Y_DUAL_STEPPER_DRIVERS) && HAS_Y2_ENABLE
2321
+    #if BOTH(Y_DUAL_STEPPER_DRIVERS, HAS_Y2_ENABLE)
2322
       Y2_ENABLE_INIT();
2322
       Y2_ENABLE_INIT();
2323
       if (!Y_ENABLE_ON) Y2_ENABLE_WRITE(HIGH);
2323
       if (!Y_ENABLE_ON) Y2_ENABLE_WRITE(HIGH);
2324
     #endif
2324
     #endif

+ 2
- 2
Marlin/src/module/stepper.h Wyświetl plik

240
 
240
 
241
   public:
241
   public:
242
 
242
 
243
-    #if HAS_EXTRA_ENDSTOPS || ENABLED(Z_STEPPER_AUTO_ALIGN)
243
+    #if EITHER(HAS_EXTRA_ENDSTOPS, Z_STEPPER_AUTO_ALIGN)
244
       static bool separate_multi_axis;
244
       static bool separate_multi_axis;
245
     #endif
245
     #endif
246
 
246
 
461
       static void microstep_readings();
461
       static void microstep_readings();
462
     #endif
462
     #endif
463
 
463
 
464
-    #if HAS_EXTRA_ENDSTOPS || ENABLED(Z_STEPPER_AUTO_ALIGN)
464
+    #if EITHER(HAS_EXTRA_ENDSTOPS, Z_STEPPER_AUTO_ALIGN)
465
       FORCE_INLINE static void set_separate_multi_axis(const bool state) { separate_multi_axis = state; }
465
       FORCE_INLINE static void set_separate_multi_axis(const bool state) { separate_multi_axis = state; }
466
     #endif
466
     #endif
467
     #if ENABLED(X_DUAL_ENDSTOPS)
467
     #if ENABLED(X_DUAL_ENDSTOPS)

+ 2
- 2
Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h Wyświetl plik

115
 //
115
 //
116
 // Z Probe (when not Z_MIN_PIN)
116
 // Z Probe (when not Z_MIN_PIN)
117
 //
117
 //
118
-#if !defined(Z_MIN_PROBE_PIN) && !(HAS_CUTTER && ENABLED(BOARD_REV_1_0))
118
+#if !defined(Z_MIN_PROBE_PIN) && !BOTH(HAS_CUTTER, BOARD_REV_1_0)
119
   #define Z_MIN_PROBE_PIN              Z_MAX_PIN
119
   #define Z_MIN_PROBE_PIN              Z_MAX_PIN
120
 #endif
120
 #endif
121
 
121
 
134
 #define Z_DIR_PIN                             39
134
 #define Z_DIR_PIN                             39
135
 #define Z_ENABLE_PIN                          35
135
 #define Z_ENABLE_PIN                          35
136
 
136
 
137
-#if HAS_CUTTER && ENABLED(BOARD_REV_1_1_TO_1_3) && EXTRUDERS == 1
137
+#if BOTH(HAS_CUTTER, BOARD_REV_1_1_TO_1_3) && EXTRUDERS == 1
138
   // Move E0 to the spare and get Spindle/Laser signals from E0
138
   // Move E0 to the spare and get Spindle/Laser signals from E0
139
   #define E0_STEP_PIN                         49
139
   #define E0_STEP_PIN                         49
140
   #define E0_DIR_PIN                          47
140
   #define E0_DIR_PIN                          47

Ładowanie…
Anuluj
Zapisz