Skip to content

Commit

Permalink
🔧 Z_PROBE_END_SCRIPT => EVENT_GCODE_AFTER_G29
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Jan 8, 2024
1 parent 5987a54 commit f4eafed
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -2032,7 +2032,7 @@
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
*/
//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10"
//#define EVENT_GCODE_AFTER_G29 "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10"

/**
* Normally G28 leaves leveling disabled on completion. Enable one of
Expand Down
6 changes: 3 additions & 3 deletions Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -681,11 +681,11 @@ void unified_bed_leveling::G29() {
ui.release();
#endif

#ifdef Z_PROBE_END_SCRIPT
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Z Probe End Script: ", Z_PROBE_END_SCRIPT);
#ifdef EVENT_GCODE_AFTER_G29
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Z Probe End Script: ", EVENT_GCODE_AFTER_G29);
if (probe_deployed) {
planner.synchronize();
gcode.process_subcommands_now(F(Z_PROBE_END_SCRIPT));
gcode.process_subcommands_now(F(EVENT_GCODE_AFTER_G29));
}
#else
UNUSED(probe_deployed);
Expand Down
6 changes: 3 additions & 3 deletions Marlin/src/gcode/bedlevel/abl/G29.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -987,10 +987,10 @@ G29_TYPE GcodeSuite::G29() {

TERN_(HAS_BED_PROBE, probe.move_z_after_probing());

#ifdef Z_PROBE_END_SCRIPT
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Z Probe End Script: ", Z_PROBE_END_SCRIPT);
#ifdef EVENT_GCODE_AFTER_G29
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Z Probe End Script: ", EVENT_GCODE_AFTER_G29);
planner.synchronize();
process_subcommands_now(F(Z_PROBE_END_SCRIPT));
process_subcommands_now(F(EVENT_GCODE_AFTER_G29));
#endif

probe.use_probing_tool(false);
Expand Down
2 changes: 2 additions & 0 deletions Marlin/src/inc/Changes.h
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,8 @@
#error "SDIO_SUPPORT is now ONBOARD_SDIO."
#elif defined(ANET_FULL_GRAPHICS_LCD_ALT_WIRING)
#error "ANET_FULL_GRAPHICS_LCD_ALT_WIRING is now CTC_A10S_A13."
#elif defined(Z_PROBE_END_SCRIPT)
#error "Z_PROBE_END_SCRIPT is now EVENT_GCODE_AFTER_G29."
#endif

// Changes to Probe Temp Compensation (#17392)
Expand Down
4 changes: 2 additions & 2 deletions buildroot/tests/mega2560
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ opt_disable X_DRIVER_TYPE Y_DRIVER_TYPE Z_DRIVER_TYPE
exec_test $1 $2 "E Axis Only | DOGM MarlinUI" "$3"

#
# Mixing Extruder with 5 steppers, Greek
# Mixing Extruder with 5 steppers, Russian
#
restore_configs
opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO MIXING_STEPPERS 5 LCD_LANGUAGE ru \
Expand All @@ -98,7 +98,7 @@ opt_enable MIXING_EXTRUDER GRADIENT_MIX GRADIENT_VTOOL CR10_STOCKDISPLAY \
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"
exec_test $1 $2 "Azteeg X3 | Mixing Extruder (x5) | Gradient Mix | Input Shaping | Russian" "$3"

#
# Test SPEAKER with BOARD_BQ_ZUM_MEGA_3D and BQ_LCD_SMART_CONTROLLER
Expand Down

0 comments on commit f4eafed

Please sign in to comment.