From 2e5a6243dffb1e1ff69c27a252e1392c23cb9fb0 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 18 Feb 2018 01:06:57 -0600 Subject: [PATCH 1/3] Option to force X or Y to home first when homing the other axis --- .travis.yml | 15 +++++++++++---- Marlin/Configuration_adv.h | 3 +++ Marlin/Marlin_main.cpp | 16 ++++++++++++---- Marlin/SanityCheck.h | 10 +++++++++- 4 files changed, 35 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5cb0b0bf0..34c0a15c9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -95,17 +95,24 @@ script: - opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT EEPROM_SETTINGS - opt_enable BLINKM PCA9632 RGB_LED NEOPIXEL_LED AUTO_POWER_CONTROL - opt_enable AUTO_BED_LEVELING_LINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE - - opt_enable_adv FWRETRACT MAX7219_DEBUG LED_CONTROL_MENU CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL + - opt_enable_adv FWRETRACT MAX7219_DEBUG LED_CONTROL_MENU CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL CODEPENDENT_XY_HOMING - opt_set ABL_GRID_POINTS_X 16 - opt_set ABL_GRID_POINTS_Y 16 - opt_set_adv FANMUX0_PIN 53 - build_marlin # - # Test a probeless build of AUTO_BED_LEVELING_UBL + # Test a probeless build of AUTO_BED_LEVELING_UBL, with lots of extruders # - restore_configs - - opt_enable AUTO_BED_LEVELING_UBL DEBUG_LEVELING_FEATURE G26_MESH_EDITING ENABLE_LEVELING_FADE_HEIGHT EEPROM_SETTINGS EEPROM_CHITCHAT G3D_PANEL - - opt_enable_adv CUSTOM_USER_MENUS I2C_POSITION_ENCODERS BABYSTEPPING BABYSTEP_XY NANODLP_Z_SYNC + - opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO + - opt_set EXTRUDERS 5 + - opt_set TEMP_SENSOR_1 1 + - opt_set TEMP_SENSOR_2 5 + - opt_set TEMP_SENSOR_3 20 + - opt_set TEMP_SENSOR_4 999 + - opt_set TEMP_SENSOR_BED 1 + - opt_enable AUTO_BED_LEVELING_UBL DEBUG_LEVELING_FEATURE G26_MESH_EDITING ENABLE_LEVELING_FADE_HEIGHT EEPROM_SETTINGS EEPROM_CHITCHAT G3D_PANEL SKEW_CORRECTION + - opt_enable_adv CUSTOM_USER_MENUS I2C_POSITION_ENCODERS BABYSTEPPING BABYSTEP_XY LIN_ADVANCE NANODLP_Z_SYNC QUICK_HOME - build_marlin # # Add a Sled Z Probe, use UBL Cartesian moves, use Japanese language diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index d0e807783..dc8f8a320 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 34a82140a..637bf3353 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -3994,10 +3994,14 @@ inline void gcode_G28(const bool always_home_all) { #endif + // Home Y (before X) #if ENABLED(HOME_Y_BEFORE_X) - // Home Y - if (home_all || homeY) { + if (home_all || homeY + #if ENABLED(CODEPENDENT_XY_HOMING) + || homeX + #endif + ) { HOMEAXIS(Y); #if ENABLED(DEBUG_LEVELING_FEATURE) if (DEBUGGING(LEVELING)) DEBUG_POS("> homeY", current_position); @@ -4007,7 +4011,11 @@ inline void gcode_G28(const bool always_home_all) { #endif // Home X - if (home_all || homeX) { + if (home_all || homeX + #if ENABLED(CODEPENDENT_XY_HOMING) && DISABLED(HOME_Y_BEFORE_X) + || homeY + #endif + ) { #if ENABLED(DUAL_X_CARRIAGE) @@ -4038,8 +4046,8 @@ inline void gcode_G28(const bool always_home_all) { #endif } + // Home Y (after X) #if DISABLED(HOME_Y_BEFORE_X) - // Home Y if (home_all || homeY) { HOMEAXIS(Y); #if ENABLED(DEBUG_LEVELING_FEATURE) diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h index af8289a34..704a63318 100644 --- a/Marlin/SanityCheck.h +++ b/Marlin/SanityCheck.h @@ -888,12 +888,20 @@ static_assert(1 >= 0 #endif /** - * Homing Bump + * Homing */ #if X_HOME_BUMP_MM < 0 || Y_HOME_BUMP_MM < 0 || Z_HOME_BUMP_MM < 0 #error "[XYZ]_HOME_BUMP_MM must be greater than or equal to 0." #endif +#if ENABLED(CODEPENDENT_XY_HOMING) + #if ENABLED(QUICK_HOME) + #error "QUICK_HOME is incompatible with CODEPENDENT_XY_HOMING." + #elif IS_KINEMATIC + #error "CODEPENDENT_XY_HOMING requires a Cartesian setup." + #endif +#endif + /** * Make sure Z_SAFE_HOMING point is reachable */ From 28e7562e7a419c8576e1e3b50379c624293f8329 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 18 Feb 2018 01:09:51 -0600 Subject: [PATCH 2/3] Add CODEPENDENT_XY_HOMING to example configs --- .../AlephObjects/TAZ4/Configuration_adv.h | 3 +++ Marlin/example_configurations/Anet/A6/Configuration_adv.h | 3 +++ Marlin/example_configurations/Anet/A8/Configuration_adv.h | 3 +++ Marlin/example_configurations/BIBO/TouchX/Configuration_adv.h | 3 +++ Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h | 3 +++ .../example_configurations/BQ/Hephestos_2/Configuration_adv.h | 3 +++ Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h | 3 +++ Marlin/example_configurations/Cartesio/Configuration_adv.h | 3 +++ .../example_configurations/Creality/CR-10/Configuration_adv.h | 3 +++ .../example_configurations/Creality/CR-10S/Configuration_adv.h | 3 +++ .../example_configurations/Creality/Ender/Configuration_adv.h | 3 +++ Marlin/example_configurations/Felix/Configuration_adv.h | 3 +++ .../FolgerTech/i3-2020/Configuration_adv.h | 3 +++ .../Infitary/i3-M508/Configuration_adv.h | 3 +++ Marlin/example_configurations/JGAurora/A5/Configuration_adv.h | 3 +++ Marlin/example_configurations/Malyan/M150/Configuration_adv.h | 3 +++ .../Micromake/C1/enhanced/Configuration_adv.h | 3 +++ Marlin/example_configurations/RigidBot/Configuration_adv.h | 3 +++ Marlin/example_configurations/SCARA/Configuration_adv.h | 3 +++ Marlin/example_configurations/Sanguinololu/Configuration_adv.h | 3 +++ Marlin/example_configurations/TinyBoy2/Configuration_adv.h | 3 +++ .../example_configurations/Velleman/K8200/Configuration_adv.h | 3 +++ .../example_configurations/Velleman/K8400/Configuration_adv.h | 3 +++ .../Wanhao/Duplicator 6/Configuration_adv.h | 3 +++ .../delta/FLSUN/auto_calibrate/Configuration_adv.h | 3 +++ .../delta/FLSUN/kossel/Configuration_adv.h | 3 +++ .../delta/FLSUN/kossel_mini/Configuration_adv.h | 3 +++ .../example_configurations/delta/generic/Configuration_adv.h | 3 +++ .../delta/kossel_mini/Configuration_adv.h | 3 +++ .../delta/kossel_pro/Configuration_adv.h | 3 +++ .../example_configurations/delta/kossel_xl/Configuration_adv.h | 3 +++ .../gCreate/gMax1.5+/Configuration_adv.h | 3 +++ Marlin/example_configurations/makibox/Configuration_adv.h | 3 +++ .../example_configurations/tvrrug/Round2/Configuration_adv.h | 3 +++ Marlin/example_configurations/wt150/Configuration_adv.h | 3 +++ 35 files changed, 105 insertions(+) diff --git a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h index 6bffd07f9..562d92624 100644 --- a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h +++ b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/example_configurations/Anet/A6/Configuration_adv.h b/Marlin/example_configurations/Anet/A6/Configuration_adv.h index c88710e9b..a3eeacaf8 100644 --- a/Marlin/example_configurations/Anet/A6/Configuration_adv.h +++ b/Marlin/example_configurations/Anet/A6/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/example_configurations/Anet/A8/Configuration_adv.h b/Marlin/example_configurations/Anet/A8/Configuration_adv.h index 510941bb2..0c21ed549 100644 --- a/Marlin/example_configurations/Anet/A8/Configuration_adv.h +++ b/Marlin/example_configurations/Anet/A8/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/example_configurations/BIBO/TouchX/Configuration_adv.h b/Marlin/example_configurations/BIBO/TouchX/Configuration_adv.h index d0e807783..dc8f8a320 100644 --- a/Marlin/example_configurations/BIBO/TouchX/Configuration_adv.h +++ b/Marlin/example_configurations/BIBO/TouchX/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h b/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h index 167d598c4..a7fd86ed2 100644 --- a/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h +++ b/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h b/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h index ea8c551fc..71ac930d1 100644 --- a/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h +++ b/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X #define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h b/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h index 167d598c4..a7fd86ed2 100644 --- a/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h +++ b/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/example_configurations/Cartesio/Configuration_adv.h b/Marlin/example_configurations/Cartesio/Configuration_adv.h index 0ce782755..0cee37fed 100644 --- a/Marlin/example_configurations/Cartesio/Configuration_adv.h +++ b/Marlin/example_configurations/Cartesio/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X #define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/example_configurations/Creality/CR-10/Configuration_adv.h b/Marlin/example_configurations/Creality/CR-10/Configuration_adv.h index 15f000a70..b3b70bc34 100755 --- a/Marlin/example_configurations/Creality/CR-10/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/CR-10/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/example_configurations/Creality/CR-10S/Configuration_adv.h b/Marlin/example_configurations/Creality/CR-10S/Configuration_adv.h index 6cb91e1e8..a351e2308 100644 --- a/Marlin/example_configurations/Creality/CR-10S/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/CR-10S/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/example_configurations/Creality/Ender/Configuration_adv.h b/Marlin/example_configurations/Creality/Ender/Configuration_adv.h index f6db8ba18..0597c07f5 100644 --- a/Marlin/example_configurations/Creality/Ender/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/Ender/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/example_configurations/Felix/Configuration_adv.h b/Marlin/example_configurations/Felix/Configuration_adv.h index aab35dc17..07629c126 100644 --- a/Marlin/example_configurations/Felix/Configuration_adv.h +++ b/Marlin/example_configurations/Felix/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/example_configurations/FolgerTech/i3-2020/Configuration_adv.h b/Marlin/example_configurations/FolgerTech/i3-2020/Configuration_adv.h index 5402ec2ac..4f75e661c 100644 --- a/Marlin/example_configurations/FolgerTech/i3-2020/Configuration_adv.h +++ b/Marlin/example_configurations/FolgerTech/i3-2020/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h b/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h index cd710f3e4..f4a25612f 100644 --- a/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h +++ b/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/example_configurations/JGAurora/A5/Configuration_adv.h b/Marlin/example_configurations/JGAurora/A5/Configuration_adv.h index 5eb7dba12..4841257fc 100644 --- a/Marlin/example_configurations/JGAurora/A5/Configuration_adv.h +++ b/Marlin/example_configurations/JGAurora/A5/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/example_configurations/Malyan/M150/Configuration_adv.h b/Marlin/example_configurations/Malyan/M150/Configuration_adv.h index 2718e733c..644cdf021 100644 --- a/Marlin/example_configurations/Malyan/M150/Configuration_adv.h +++ b/Marlin/example_configurations/Malyan/M150/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/example_configurations/Micromake/C1/enhanced/Configuration_adv.h b/Marlin/example_configurations/Micromake/C1/enhanced/Configuration_adv.h index 2cd5f87b6..309a7d771 100644 --- a/Marlin/example_configurations/Micromake/C1/enhanced/Configuration_adv.h +++ b/Marlin/example_configurations/Micromake/C1/enhanced/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/example_configurations/RigidBot/Configuration_adv.h b/Marlin/example_configurations/RigidBot/Configuration_adv.h index e8066f11a..c5ecb724f 100644 --- a/Marlin/example_configurations/RigidBot/Configuration_adv.h +++ b/Marlin/example_configurations/RigidBot/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/example_configurations/SCARA/Configuration_adv.h b/Marlin/example_configurations/SCARA/Configuration_adv.h index 4d8c4eb55..9c53b4ca6 100644 --- a/Marlin/example_configurations/SCARA/Configuration_adv.h +++ b/Marlin/example_configurations/SCARA/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/example_configurations/Sanguinololu/Configuration_adv.h b/Marlin/example_configurations/Sanguinololu/Configuration_adv.h index 570891a21..89689ab68 100644 --- a/Marlin/example_configurations/Sanguinololu/Configuration_adv.h +++ b/Marlin/example_configurations/Sanguinololu/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/example_configurations/TinyBoy2/Configuration_adv.h b/Marlin/example_configurations/TinyBoy2/Configuration_adv.h index 4b04e8d20..810da7677 100644 --- a/Marlin/example_configurations/TinyBoy2/Configuration_adv.h +++ b/Marlin/example_configurations/TinyBoy2/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h b/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h index 801f5463d..8175f96ca 100644 --- a/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h +++ b/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h @@ -375,6 +375,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h b/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h index 85d130ac9..414982dca 100644 --- a/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h +++ b/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration_adv.h b/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration_adv.h index 7a8d29312..a5607e4ba 100644 --- a/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration_adv.h +++ b/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h index 3684f9f52..476752854 100644 --- a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/example_configurations/delta/FLSUN/kossel/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/kossel/Configuration_adv.h index 200811bec..ff5d27593 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h index 50225cf58..d8bdcbf82 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/example_configurations/delta/generic/Configuration_adv.h b/Marlin/example_configurations/delta/generic/Configuration_adv.h index 50225cf58..d8bdcbf82 100644 --- a/Marlin/example_configurations/delta/generic/Configuration_adv.h +++ b/Marlin/example_configurations/delta/generic/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h index 50225cf58..d8bdcbf82 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h index 7e7637844..20e21381b 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h @@ -367,6 +367,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h index fb88a7742..35588e8bb 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h index 8911ef61a..51c891da2 100644 --- a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h +++ b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/example_configurations/makibox/Configuration_adv.h b/Marlin/example_configurations/makibox/Configuration_adv.h index 0de85222b..38be6c45a 100644 --- a/Marlin/example_configurations/makibox/Configuration_adv.h +++ b/Marlin/example_configurations/makibox/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h index 93cb13e63..d715d495c 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} diff --git a/Marlin/example_configurations/wt150/Configuration_adv.h b/Marlin/example_configurations/wt150/Configuration_adv.h index c0ca835e6..f0992fd2e 100644 --- a/Marlin/example_configurations/wt150/Configuration_adv.h +++ b/Marlin/example_configurations/wt150/Configuration_adv.h @@ -362,6 +362,9 @@ // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + // @section machine #define AXIS_RELATIVE_MODES {false, false, false, false} From 65d69e9507950313e3caf507318c12e9e2e23158 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 18 Feb 2018 01:09:56 -0600 Subject: [PATCH 3/3] Strip excess G28 debug logging --- Marlin/Marlin_main.cpp | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 637bf3353..3066d8063 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -3965,12 +3965,7 @@ inline void gcode_G28(const bool always_home_all) { #if Z_HOME_DIR > 0 // If homing away from BED do Z first - if (home_all || homeZ) { - HOMEAXIS(Z); - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("> HOMEAXIS(Z)", current_position); - #endif - } + if (home_all || homeZ) HOMEAXIS(Z); #endif @@ -4001,12 +3996,7 @@ inline void gcode_G28(const bool always_home_all) { #if ENABLED(CODEPENDENT_XY_HOMING) || homeX #endif - ) { - HOMEAXIS(Y); - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("> homeY", current_position); - #endif - } + ) HOMEAXIS(Y); #endif @@ -4040,20 +4030,11 @@ inline void gcode_G28(const bool always_home_all) { HOMEAXIS(X); #endif - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("> homeX", current_position); - #endif } // Home Y (after X) #if DISABLED(HOME_Y_BEFORE_X) - if (home_all || homeY) { - HOMEAXIS(Y); - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("> homeY", current_position); - #endif - } + if (home_all || homeY) HOMEAXIS(Y); #endif // Home Z last if homing towards the bed @@ -4064,9 +4045,6 @@ inline void gcode_G28(const bool always_home_all) { #else HOMEAXIS(Z); #endif - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) DEBUG_POS("> (home_all || homeZ) > final", current_position); - #endif } // home_all || homeZ #endif // Z_HOME_DIR < 0