XY_AFTER_HOMING, EVENT_GCODE_AFTER_HOMING (#26469)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
mikemerryguy 2023-11-28 18:55:21 -05:00 committed by GitHub
parent dabcd65903
commit f4228cc4c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 5 deletions

View file

@ -1758,10 +1758,13 @@
*/
//#define Z_IDLE_HEIGHT Z_HOME_POS
//#define Z_CLEARANCE_FOR_HOMING 4 // (mm) Minimal Z height before homing (G28) for Z clearance above the bed, clamps, ...
// Be sure to have this much clearance over your Z_MAX_POS to prevent grinding.
//#define Z_CLEARANCE_FOR_HOMING 4 // (mm) Minimal Z height before homing (G28) for Z clearance above the bed, clamps, ...
// You'll need this much clearance above Z_MAX_POS to avoid grinding.
//#define Z_AFTER_HOMING 10 // (mm) Height to move to after homing (if Z was homed)
//#define Z_AFTER_HOMING 10 // (mm) Height to move to after homing (if Z was homed)
//#define XY_AFTER_HOMING { 10, 10 } // (mm) Move to an XY position after homing (and raising Z)
//#define EVENT_GCODE_AFTER_HOMING "M300 P440 S200" // Commands to run after G28 (and move to XY_AFTER_HOMING)
// Direction of endstops when homing; 1=MAX, -1=MIN
// :[-1,1]
@ -2246,8 +2249,8 @@
//#define Z_SAFE_HOMING
#if ENABLED(Z_SAFE_HOMING)
#define Z_SAFE_HOMING_X_POINT X_CENTER // X point for Z homing
#define Z_SAFE_HOMING_Y_POINT Y_CENTER // Y point for Z homing
#define Z_SAFE_HOMING_X_POINT X_CENTER // (mm) X point for Z homing
#define Z_SAFE_HOMING_Y_POINT Y_CENTER // (mm) Y point for Z homing
//#define Z_SAFE_HOMING_POINT_ABSOLUTE // Ignore home offsets (M206) for Z homing position
#endif

View file

@ -638,6 +638,11 @@ void GcodeSuite::G28() {
tool_change(old_tool_index, TERN(PARKING_EXTRUDER, !pe_final_change_must_unpark, DISABLED(DUAL_X_CARRIAGE))); // Do move if one of these
#endif
#ifdef XY_AFTER_HOMING
constexpr xy_pos_t xy_after XY_AFTER_HOMING;
do_blocking_move_to(xy_after);
#endif
restore_feedrate_and_scaling();
if (ENABLED(NANODLP_Z_SYNC) && (ENABLED(NANODLP_ALL_AXIS) || TERN0(HAS_Z_AXIS, doZ)))
@ -654,4 +659,8 @@ void GcodeSuite::G28() {
TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(old_grblstate));
#ifdef EVENT_GCODE_AFTER_HOMING
gcode.process_subcommands_now(F(EVENT_GCODE_AFTER_HOMING));
#endif
}

View file

@ -94,6 +94,7 @@ opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO MIXING_STEPPERS 5 LCD_LANGUAGE ru \
FIL_RUNOUT2_PIN 16 FIL_RUNOUT3_PIN 17 FIL_RUNOUT4_PIN 4 FIL_RUNOUT5_PIN 5
opt_enable MIXING_EXTRUDER GRADIENT_MIX GRADIENT_VTOOL CR10_STOCKDISPLAY \
USE_CONTROLLER_FAN CONTROLLER_FAN_EDITABLE CONTROLLER_FAN_IGNORE_Z \
XY_AFTER_HOMING EVENT_GCODE_AFTER_HOMING \
FILAMENT_RUNOUT_SENSOR ADVANCED_PAUSE_FEATURE NOZZLE_PARK_FEATURE INPUT_SHAPING_X INPUT_SHAPING_Y
opt_disable DISABLE_OTHER_EXTRUDERS
exec_test $1 $2 "Azteeg X3 | Mixing Extruder (x5) | Gradient Mix | Input Shaping | Greek" "$3"