Add JOIN for simple append

This commit is contained in:
Scott Lahteine 2019-10-03 18:48:31 -05:00
parent 51ae13fc8c
commit 9188ce1a8d
4 changed files with 19 additions and 24 deletions

View file

@ -227,6 +227,9 @@
#define LIST_N(N,V...) _LIST_N(N,V) #define LIST_N(N,V...) _LIST_N(N,V)
#define ARRAY_N(N,V...) { _LIST_N(N,V) } #define ARRAY_N(N,V...) { _LIST_N(N,V) }
#define _JOIN_1(O) (O)
#define JOIN_N(N,C,V...) (DO(JOIN,C,LIST_N(N,V)))
// Macros for adding // Macros for adding
#define INC_0 1 #define INC_0 1
#define INC_1 2 #define INC_1 2

View file

@ -253,24 +253,14 @@ void _menu_temp_filament_op(const PauseMode inMode, const int8_t extruder) {
SUBMENU(MSG_FILAMENTUNLOAD, menu_temp_e0_filament_unload); SUBMENU(MSG_FILAMENTUNLOAD, menu_temp_e0_filament_unload);
#else #else
#if ENABLED(FILAMENT_UNLOAD_ALL_EXTRUDERS) #if ENABLED(FILAMENT_UNLOAD_ALL_EXTRUDERS)
if (thermalManager.targetHotEnoughToExtrude(0) if (JOIN_N(E_STEPPERS, &&,
#if E_STEPPERS > 1 thermalManager.targetHotEnoughToExtrude(0),
&& thermalManager.targetHotEnoughToExtrude(1) thermalManager.targetHotEnoughToExtrude(1),
#if E_STEPPERS > 2 thermalManager.targetHotEnoughToExtrude(2),
&& thermalManager.targetHotEnoughToExtrude(2) thermalManager.targetHotEnoughToExtrude(3),
#if E_STEPPERS > 3 thermalManager.targetHotEnoughToExtrude(4),
&& thermalManager.targetHotEnoughToExtrude(3) thermalManager.targetHotEnoughToExtrude(5))
#if E_STEPPERS > 4 ) GCODES_ITEM(MSG_FILAMENTUNLOAD_ALL, PSTR("M702"));
&& thermalManager.targetHotEnoughToExtrude(4)
#if E_STEPPERS > 5
&& thermalManager.targetHotEnoughToExtrude(5)
#endif // E_STEPPERS > 5
#endif // E_STEPPERS > 4
#endif // E_STEPPERS > 3
#endif // E_STEPPERS > 2
#endif // E_STEPPERS > 1
)
GCODES_ITEM(MSG_FILAMENTUNLOAD_ALL, PSTR("M702"));
else else
SUBMENU(MSG_FILAMENTUNLOAD_ALL, menu_unload_filament_all_temp); SUBMENU(MSG_FILAMENTUNLOAD_ALL, menu_unload_filament_all_temp);
#endif #endif

View file

@ -31,17 +31,19 @@ opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER LCD_PROGRESS_BAR LCD_PROGRESS_BAR_TE
EEPROM_SETTINGS SDSUPPORT SD_REPRINT_LAST_SELECTED_FILE BINARY_FILE_TRANSFER \ EEPROM_SETTINGS SDSUPPORT SD_REPRINT_LAST_SELECTED_FILE BINARY_FILE_TRANSFER \
BLINKM PCA9632 RGB_LED RGB_LED_R_PIN RGB_LED_G_PIN RGB_LED_B_PIN LED_CONTROL_MENU \ BLINKM PCA9632 RGB_LED RGB_LED_R_PIN RGB_LED_G_PIN RGB_LED_B_PIN LED_CONTROL_MENU \
NEOPIXEL_LED CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL CASE_LIGHT_MENU \ NEOPIXEL_LED CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL CASE_LIGHT_MENU \
NOZZLE_PARK_FEATURE ADVANCED_PAUSE_FEATURE FILAMENT_RUNOUT_DISTANCE_MM FILAMENT_RUNOUT_SENSOR \ PID_PARAMS_PER_HOTEND PID_AUTOTUNE_MENU PID_EDIT_MENU \
AUTO_BED_LEVELING_BILINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE \ NOZZLE_PARK_FEATURE FILAMENT_RUNOUT_SENSOR FILAMENT_RUNOUT_DISTANCE_MM \
ADVANCED_PAUSE_FEATURE FILAMENT_LOAD_UNLOAD_GCODES FILAMENT_UNLOAD_ALL_EXTRUDERS \
AUTO_BED_LEVELING_BILINEAR Z_MIN_PROBE_REPEATABILITY_TEST \
SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE \ SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE \
BACKLASH_COMPENSATION BACKLASH_GCODE BAUD_RATE_GCODE BEZIER_CURVE_SUPPORT \ BACKLASH_COMPENSATION BACKLASH_GCODE BAUD_RATE_GCODE BEZIER_CURVE_SUPPORT \
FWRETRACT ARC_P_CIRCLES CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS \ FWRETRACT ARC_P_CIRCLES CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS \
PSU_CONTROL AUTO_POWER_CONTROL POWER_LOSS_RECOVERY POWER_LOSS_PIN POWER_LOSS_STATE \ PSU_CONTROL AUTO_POWER_CONTROL POWER_LOSS_RECOVERY POWER_LOSS_PIN POWER_LOSS_STATE \
SLOW_PWM_HEATERS THERMAL_PROTECTION_CHAMBER \ SLOW_PWM_HEATERS THERMAL_PROTECTION_CHAMBER LIN_ADVANCE \
PINS_DEBUGGING MAX7219_DEBUG M114_DETAIL PINS_DEBUGGING MAX7219_DEBUG M114_DETAIL
opt_set TEMP_SENSOR_CHAMBER 3 opt_set TEMP_SENSOR_CHAMBER 3
opt_set HEATER_CHAMBER_PIN 45 opt_set HEATER_CHAMBER_PIN 45
exec_test $1 $2 "RAMPS with 2 extruders, RepRap LCD, Linear ABL, LEDs, and many options" exec_test $1 $2 "RAMPS, 2 extruders, LCD/SD, Probe, ABL-Linear, PLR, LEDs, many options"
# #
# Test a probeless build of AUTO_BED_LEVELING_UBL, with lots of extruders # Test a probeless build of AUTO_BED_LEVELING_UBL, with lots of extruders

View file

@ -13,14 +13,14 @@ opt_set MOTHERBOARD BOARD_TEENSY31_32
exec_test $1 $2 "Teensy3.1 with default config" exec_test $1 $2 "Teensy3.1 with default config"
# #
# Test as many features together as possible # Test many features together
# #
restore_configs restore_configs
opt_set MOTHERBOARD BOARD_TEENSY31_32 opt_set MOTHERBOARD BOARD_TEENSY31_32
opt_set TEMP_SENSOR_0 1 opt_set TEMP_SENSOR_0 1
opt_set TEMP_SENSOR_BED 1 opt_set TEMP_SENSOR_BED 1
opt_enable EEPROM_SETTINGS FILAMENT_WIDTH_SENSOR CALIBRATION_GCODE BAUD_RATE_GCODE \ opt_enable EEPROM_SETTINGS FILAMENT_WIDTH_SENSOR CALIBRATION_GCODE BAUD_RATE_GCODE \
FIX_MOUNTED_PROBE Z_SAFE_HOMING AUTO_BED_LEVELING_BILINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE \ FIX_MOUNTED_PROBE Z_SAFE_HOMING AUTO_BED_LEVELING_BILINEAR DEBUG_LEVELING_FEATURE Z_MIN_PROBE_REPEATABILITY_TEST \
BABYSTEPPING BABYSTEP_XY BABYSTEP_ZPROBE_OFFSET PRINTCOUNTER SLOW_PWM_HEATERS PIDTEMPBED \ BABYSTEPPING BABYSTEP_XY BABYSTEP_ZPROBE_OFFSET PRINTCOUNTER SLOW_PWM_HEATERS PIDTEMPBED \
INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT M100_FREE_MEMORY_WATCHER \ INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT M100_FREE_MEMORY_WATCHER \
NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE PARK_HEAD_ON_PAUSE \ NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE PARK_HEAD_ON_PAUSE \