From 10c14bcc05a85d3f012d90f9963d97c72b1296d6 Mon Sep 17 00:00:00 2001 From: ellensp Date: Tue, 23 Mar 2021 19:47:07 +1300 Subject: [PATCH] Check NOZZLE_CLEAN_FEATURE settings (#21332) Co-authored-by: Scott Lahteine --- .github/workflows/test-builds.yml | 1 + Marlin/src/inc/SanityCheck.h | 15 +++++++++++++++ buildroot/tests/LPC1768 | 4 +++- buildroot/tests/LPC1769 | 4 +++- buildroot/tests/STM32F103RE | 4 +++- buildroot/tests/teensy35 | 4 +++- buildroot/tests/teensy41 | 4 +++- 7 files changed, 31 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-builds.yml b/.github/workflows/test-builds.yml index 7549e3def..7b7052e0e 100644 --- a/.github/workflows/test-builds.yml +++ b/.github/workflows/test-builds.yml @@ -98,6 +98,7 @@ jobs: # Non-working environment tests #- at90usb1286_cdc #- STM32F103CB_malyan + #- STM32F103RE #- mks_robin_mini steps: diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index af30c6156..d8111c18d 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -3349,6 +3349,21 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2) #error "Either enable MEATPACK_ON_SERIAL_PORT_* or BINARY_FILE_TRANSFER, not both." #endif +/** + * Sanity check for unique start and stop values in NOZZLE_CLEAN_FEATURE + */ +#if ENABLED(NOZZLE_CLEAN_FEATURE) + constexpr xyz_pos_t start_xyz[8] = NOZZLE_CLEAN_START_POINT, + end_xyz[8] = NOZZLE_CLEAN_END_POINT; + #define _CLEAN_ASSERT(N) static_assert(N >= HOTENDS || end_xyz[N].x != start_xyz[N].x || TERN(NOZZLE_CLEAN_NO_Y, false, end_xyz[N].y != start_xyz[N].y), \ + "NOZZLE_CLEAN Start and End must be made different on HOTEND " STRINGIFY(N)) + _CLEAN_ASSERT(0); _CLEAN_ASSERT(1); + _CLEAN_ASSERT(2); _CLEAN_ASSERT(3); + _CLEAN_ASSERT(4); _CLEAN_ASSERT(5); + _CLEAN_ASSERT(6); _CLEAN_ASSERT(7); + #undef _CLEAN_ASSERT +#endif + /** * Sanity check for valid stepper driver types */ diff --git a/buildroot/tests/LPC1768 b/buildroot/tests/LPC1768 index a6829e85e..eef0857da 100755 --- a/buildroot/tests/LPC1768 +++ b/buildroot/tests/LPC1768 @@ -34,7 +34,9 @@ opt_set MOTHERBOARD BOARD_RAMPS_14_RE_ARM_EEB \ EXTRUDERS 2 TEMP_SENSOR_1 -1 TEMP_SENSOR_BED 5 \ GRID_MAX_POINTS_X 16 \ NOZZLE_TO_PROBE_OFFSET '{ 0, 0, 0 }' \ - NOZZLE_CLEAN_MIN_TEMP 170 + NOZZLE_CLEAN_MIN_TEMP 170 \ + NOZZLE_CLEAN_START_POINT "{ { 10, 10, 3 }, { 10, 10, 3 } }" \ + NOZZLE_CLEAN_END_POINT "{ { 10, 20, 3 }, { 10, 20, 3 } }" opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER ADAPTIVE_FAN_SLOWING NO_FAN_SLOWING_IN_PID_TUNING \ FILAMENT_WIDTH_SENSOR FILAMENT_LCD_DISPLAY PID_EXTRUSION_SCALING SOUND_MENU_ITEM \ NOZZLE_AS_PROBE AUTO_BED_LEVELING_BILINEAR PREHEAT_BEFORE_LEVELING G29_RETRY_AND_RECOVER Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE \ diff --git a/buildroot/tests/LPC1769 b/buildroot/tests/LPC1769 index 5ca711454..f0dab630e 100755 --- a/buildroot/tests/LPC1769 +++ b/buildroot/tests/LPC1769 @@ -15,7 +15,9 @@ exec_test $1 $2 "Azteeg X5GT Example Configuration" "$3" restore_configs opt_set MOTHERBOARD BOARD_SMOOTHIEBOARD \ EXTRUDERS 2 TEMP_SENSOR_1 -1 TEMP_SENSOR_BED 5 \ - GRID_MAX_POINTS_X 16 + GRID_MAX_POINTS_X 16 \ + NOZZLE_CLEAN_START_POINT "{ { 10, 10, 3 }, { 10, 10, 3 } }" \ + NOZZLE_CLEAN_END_POINT "{ { 10, 20, 3 }, { 10, 20, 3 } }" opt_enable TFTGLCD_PANEL_SPI SDSUPPORT ADAPTIVE_FAN_SLOWING NO_FAN_SLOWING_IN_PID_TUNING \ FIX_MOUNTED_PROBE AUTO_BED_LEVELING_BILINEAR G29_RETRY_AND_RECOVER Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE \ BABYSTEPPING BABYSTEP_XY BABYSTEP_ZPROBE_OFFSET LEVEL_CORNERS_USE_PROBE LEVEL_CORNERS_VERIFY_RAISED \ diff --git a/buildroot/tests/STM32F103RE b/buildroot/tests/STM32F103RE index 426f87d21..641f1fa56 100755 --- a/buildroot/tests/STM32F103RE +++ b/buildroot/tests/STM32F103RE @@ -10,7 +10,9 @@ set -e # Build with the default configurations # restore_configs -opt_set MOTHERBOARD BOARD_STM32F103RE SERIAL_PORT -1 EXTRUDERS 2 +opt_set MOTHERBOARD BOARD_STM32F103RE SERIAL_PORT -1 EXTRUDERS 2 \ + NOZZLE_CLEAN_START_POINT "{ { 10, 10, 3 }, { 10, 10, 3 } }" \ + NOZZLE_CLEAN_END_POINT "{ { 10, 20, 3 }, { 10, 20, 3 } }" opt_enable EEPROM_SETTINGS EEPROM_CHITCHAT REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT \ PAREN_COMMENTS GCODE_MOTION_MODES SINGLENOZZLE TOOLCHANGE_FILAMENT_SWAP TOOLCHANGE_PARK \ BAUD_RATE_GCODE GCODE_MACROS NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE diff --git a/buildroot/tests/teensy35 b/buildroot/tests/teensy35 index c9731665c..36a261a6a 100755 --- a/buildroot/tests/teensy35 +++ b/buildroot/tests/teensy35 @@ -17,7 +17,9 @@ restore_configs opt_set MOTHERBOARD BOARD_TEENSY35_36 \ EXTRUDERS 2 TEMP_SENSOR_0 1 TEMP_SENSOR_1 5 TEMP_SENSOR_BED 1 \ I2C_SLAVE_ADDRESS 63 \ - GRID_MAX_POINTS_X 16 + GRID_MAX_POINTS_X 16 \ + NOZZLE_CLEAN_START_POINT "{ { 10, 10, 3 }, { 10, 10, 3 } }" \ + NOZZLE_CLEAN_END_POINT "{ { 10, 20, 3 }, { 10, 20, 3 } }" opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER LCD_INFO_MENU SDSUPPORT SDCARD_SORT_ALPHA \ FILAMENT_WIDTH_SENSOR FILAMENT_LCD_DISPLAY CALIBRATION_GCODE BAUD_RATE_GCODE SOUND_MENU_ITEM \ FIX_MOUNTED_PROBE Z_SAFE_HOMING AUTO_BED_LEVELING_BILINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE \ diff --git a/buildroot/tests/teensy41 b/buildroot/tests/teensy41 index 6074b5dc5..55e7e6eae 100755 --- a/buildroot/tests/teensy41 +++ b/buildroot/tests/teensy41 @@ -17,7 +17,9 @@ restore_configs opt_set MOTHERBOARD BOARD_TEENSY41 \ EXTRUDERS 2 TEMP_SENSOR_0 1 TEMP_SENSOR_1 5 TEMP_SENSOR_BED 1 \ I2C_SLAVE_ADDRESS 63 \ - GRID_MAX_POINTS_X 16 + GRID_MAX_POINTS_X 16 \ + NOZZLE_CLEAN_START_POINT "{ { 10, 10, 3 }, { 10, 10, 3 } }" \ + NOZZLE_CLEAN_END_POINT "{ { 10, 20, 3 }, { 10, 20, 3 } }" opt_enable EXTENSIBLE_UI LCD_INFO_MENU SDSUPPORT SDCARD_SORT_ALPHA \ FILAMENT_LCD_DISPLAY CALIBRATION_GCODE BAUD_RATE_GCODE \ FIX_MOUNTED_PROBE Z_SAFE_HOMING AUTO_BED_LEVELING_BILINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE \