Kaynağa Gözat

Add JOIN for simple append

Scott Lahteine 5 yıl önce
ebeveyn
işleme
9188ce1a8d

+ 3
- 0
Marlin/src/core/macros.h Dosyayı Görüntüle

@@ -227,6 +227,9 @@
227 227
 #define LIST_N(N,V...) _LIST_N(N,V)
228 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 233
 // Macros for adding
231 234
 #define INC_0 1
232 235
 #define INC_1 2

+ 8
- 18
Marlin/src/lcd/menu/menu_filament.cpp Dosyayı Görüntüle

@@ -253,24 +253,14 @@ void _menu_temp_filament_op(const PauseMode inMode, const int8_t extruder) {
253 253
             SUBMENU(MSG_FILAMENTUNLOAD, menu_temp_e0_filament_unload);
254 254
         #else
255 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 264
           else
275 265
             SUBMENU(MSG_FILAMENTUNLOAD_ALL, menu_unload_filament_all_temp);
276 266
           #endif

+ 6
- 4
buildroot/share/tests/megaatmega2560-tests Dosyayı Görüntüle

@@ -31,17 +31,19 @@ opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER LCD_PROGRESS_BAR LCD_PROGRESS_BAR_TE
31 31
            EEPROM_SETTINGS SDSUPPORT SD_REPRINT_LAST_SELECTED_FILE BINARY_FILE_TRANSFER \
32 32
            BLINKM PCA9632 RGB_LED RGB_LED_R_PIN RGB_LED_G_PIN RGB_LED_B_PIN LED_CONTROL_MENU \
33 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 38
            SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE \
37 39
            BACKLASH_COMPENSATION BACKLASH_GCODE BAUD_RATE_GCODE BEZIER_CURVE_SUPPORT \
38 40
            FWRETRACT ARC_P_CIRCLES CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS \
39 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 43
            PINS_DEBUGGING MAX7219_DEBUG M114_DETAIL
42 44
 opt_set TEMP_SENSOR_CHAMBER 3
43 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 49
 # Test a probeless build of AUTO_BED_LEVELING_UBL, with lots of extruders

+ 2
- 2
buildroot/share/tests/teensy31-tests Dosyayı Görüntüle

@@ -13,14 +13,14 @@ opt_set MOTHERBOARD BOARD_TEENSY31_32
13 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 18
 restore_configs
19 19
 opt_set MOTHERBOARD BOARD_TEENSY31_32
20 20
 opt_set TEMP_SENSOR_0 1
21 21
 opt_set TEMP_SENSOR_BED 1
22 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 24
            BABYSTEPPING BABYSTEP_XY BABYSTEP_ZPROBE_OFFSET PRINTCOUNTER SLOW_PWM_HEATERS PIDTEMPBED \
25 25
            INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT M100_FREE_MEMORY_WATCHER \
26 26
            NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE PARK_HEAD_ON_PAUSE \

Loading…
İptal
Kaydet