Browse Source

Add JOIN for simple append

Scott Lahteine 5 years ago
parent
commit
9188ce1a8d

+ 3
- 0
Marlin/src/core/macros.h View File

227
 #define LIST_N(N,V...) _LIST_N(N,V)
227
 #define LIST_N(N,V...) _LIST_N(N,V)
228
 #define ARRAY_N(N,V...) { _LIST_N(N,V) }
228
 #define ARRAY_N(N,V...) { _LIST_N(N,V) }
229
 
229
 
230
+#define _JOIN_1(O)         (O)
231
+#define JOIN_N(N,C,V...)   (DO(JOIN,C,LIST_N(N,V)))
232
+
230
 // Macros for adding
233
 // Macros for adding
231
 #define INC_0 1
234
 #define INC_0 1
232
 #define INC_1 2
235
 #define INC_1 2

+ 8
- 18
Marlin/src/lcd/menu/menu_filament.cpp View File

253
             SUBMENU(MSG_FILAMENTUNLOAD, menu_temp_e0_filament_unload);
253
             SUBMENU(MSG_FILAMENTUNLOAD, menu_temp_e0_filament_unload);
254
         #else
254
         #else
255
           #if ENABLED(FILAMENT_UNLOAD_ALL_EXTRUDERS)
255
           #if ENABLED(FILAMENT_UNLOAD_ALL_EXTRUDERS)
256
-            if (thermalManager.targetHotEnoughToExtrude(0)
257
-              #if E_STEPPERS > 1
258
-                && thermalManager.targetHotEnoughToExtrude(1)
259
-                #if E_STEPPERS > 2
260
-                  && thermalManager.targetHotEnoughToExtrude(2)
261
-                  #if E_STEPPERS > 3
262
-                    && thermalManager.targetHotEnoughToExtrude(3)
263
-                    #if E_STEPPERS > 4
264
-                      && thermalManager.targetHotEnoughToExtrude(4)
265
-                      #if E_STEPPERS > 5
266
-                        && thermalManager.targetHotEnoughToExtrude(5)
267
-                      #endif // E_STEPPERS > 5
268
-                    #endif // E_STEPPERS > 4
269
-                  #endif // E_STEPPERS > 3
270
-                #endif // E_STEPPERS > 2
271
-              #endif // E_STEPPERS > 1
272
-            )
273
-              GCODES_ITEM(MSG_FILAMENTUNLOAD_ALL, PSTR("M702"));
256
+            if (JOIN_N(E_STEPPERS, &&,
257
+              thermalManager.targetHotEnoughToExtrude(0),
258
+              thermalManager.targetHotEnoughToExtrude(1),
259
+              thermalManager.targetHotEnoughToExtrude(2),
260
+              thermalManager.targetHotEnoughToExtrude(3),
261
+              thermalManager.targetHotEnoughToExtrude(4),
262
+              thermalManager.targetHotEnoughToExtrude(5))
263
+            ) GCODES_ITEM(MSG_FILAMENTUNLOAD_ALL, PSTR("M702"));
274
           else
264
           else
275
             SUBMENU(MSG_FILAMENTUNLOAD_ALL, menu_unload_filament_all_temp);
265
             SUBMENU(MSG_FILAMENTUNLOAD_ALL, menu_unload_filament_all_temp);
276
           #endif
266
           #endif

+ 6
- 4
buildroot/share/tests/megaatmega2560-tests View File

31
            EEPROM_SETTINGS SDSUPPORT SD_REPRINT_LAST_SELECTED_FILE BINARY_FILE_TRANSFER \
31
            EEPROM_SETTINGS SDSUPPORT SD_REPRINT_LAST_SELECTED_FILE BINARY_FILE_TRANSFER \
32
            BLINKM PCA9632 RGB_LED RGB_LED_R_PIN RGB_LED_G_PIN RGB_LED_B_PIN LED_CONTROL_MENU \
32
            BLINKM PCA9632 RGB_LED RGB_LED_R_PIN RGB_LED_G_PIN RGB_LED_B_PIN LED_CONTROL_MENU \
33
            NEOPIXEL_LED CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL CASE_LIGHT_MENU \
33
            NEOPIXEL_LED CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL CASE_LIGHT_MENU \
34
-           NOZZLE_PARK_FEATURE ADVANCED_PAUSE_FEATURE FILAMENT_RUNOUT_DISTANCE_MM FILAMENT_RUNOUT_SENSOR \
35
-           AUTO_BED_LEVELING_BILINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE \
34
+           PID_PARAMS_PER_HOTEND PID_AUTOTUNE_MENU PID_EDIT_MENU \
35
+           NOZZLE_PARK_FEATURE FILAMENT_RUNOUT_SENSOR FILAMENT_RUNOUT_DISTANCE_MM \
36
+           ADVANCED_PAUSE_FEATURE FILAMENT_LOAD_UNLOAD_GCODES FILAMENT_UNLOAD_ALL_EXTRUDERS \
37
+           AUTO_BED_LEVELING_BILINEAR Z_MIN_PROBE_REPEATABILITY_TEST \
36
            SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE \
38
            SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE \
37
            BACKLASH_COMPENSATION BACKLASH_GCODE BAUD_RATE_GCODE BEZIER_CURVE_SUPPORT \
39
            BACKLASH_COMPENSATION BACKLASH_GCODE BAUD_RATE_GCODE BEZIER_CURVE_SUPPORT \
38
            FWRETRACT ARC_P_CIRCLES CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS \
40
            FWRETRACT ARC_P_CIRCLES CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS \
39
            PSU_CONTROL AUTO_POWER_CONTROL POWER_LOSS_RECOVERY POWER_LOSS_PIN POWER_LOSS_STATE \
41
            PSU_CONTROL AUTO_POWER_CONTROL POWER_LOSS_RECOVERY POWER_LOSS_PIN POWER_LOSS_STATE \
40
-           SLOW_PWM_HEATERS THERMAL_PROTECTION_CHAMBER \
42
+           SLOW_PWM_HEATERS THERMAL_PROTECTION_CHAMBER LIN_ADVANCE \
41
            PINS_DEBUGGING MAX7219_DEBUG M114_DETAIL
43
            PINS_DEBUGGING MAX7219_DEBUG M114_DETAIL
42
 opt_set TEMP_SENSOR_CHAMBER 3
44
 opt_set TEMP_SENSOR_CHAMBER 3
43
 opt_set HEATER_CHAMBER_PIN 45
45
 opt_set HEATER_CHAMBER_PIN 45
44
-exec_test $1 $2 "RAMPS with 2 extruders, RepRap LCD, Linear ABL, LEDs, and many options"
46
+exec_test $1 $2 "RAMPS, 2 extruders, LCD/SD, Probe, ABL-Linear, PLR, LEDs, many options"
45
 
47
 
46
 #
48
 #
47
 # Test a probeless build of AUTO_BED_LEVELING_UBL, with lots of extruders
49
 # Test a probeless build of AUTO_BED_LEVELING_UBL, with lots of extruders

+ 2
- 2
buildroot/share/tests/teensy31-tests View File

13
 exec_test $1 $2 "Teensy3.1 with default config"
13
 exec_test $1 $2 "Teensy3.1 with default config"
14
 
14
 
15
 #
15
 #
16
-# Test as many features together as possible
16
+# Test many features together
17
 #
17
 #
18
 restore_configs
18
 restore_configs
19
 opt_set MOTHERBOARD BOARD_TEENSY31_32
19
 opt_set MOTHERBOARD BOARD_TEENSY31_32
20
 opt_set TEMP_SENSOR_0 1
20
 opt_set TEMP_SENSOR_0 1
21
 opt_set TEMP_SENSOR_BED 1
21
 opt_set TEMP_SENSOR_BED 1
22
 opt_enable EEPROM_SETTINGS FILAMENT_WIDTH_SENSOR CALIBRATION_GCODE BAUD_RATE_GCODE \
22
 opt_enable EEPROM_SETTINGS FILAMENT_WIDTH_SENSOR CALIBRATION_GCODE BAUD_RATE_GCODE \
23
-           FIX_MOUNTED_PROBE Z_SAFE_HOMING AUTO_BED_LEVELING_BILINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE \
23
+           FIX_MOUNTED_PROBE Z_SAFE_HOMING AUTO_BED_LEVELING_BILINEAR DEBUG_LEVELING_FEATURE Z_MIN_PROBE_REPEATABILITY_TEST \
24
            BABYSTEPPING BABYSTEP_XY BABYSTEP_ZPROBE_OFFSET PRINTCOUNTER SLOW_PWM_HEATERS PIDTEMPBED \
24
            BABYSTEPPING BABYSTEP_XY BABYSTEP_ZPROBE_OFFSET PRINTCOUNTER SLOW_PWM_HEATERS PIDTEMPBED \
25
            INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT M100_FREE_MEMORY_WATCHER \
25
            INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT M100_FREE_MEMORY_WATCHER \
26
            NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE PARK_HEAD_ON_PAUSE \
26
            NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE PARK_HEAD_ON_PAUSE \

Loading…
Cancel
Save