Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
ac73c9c
BugFix for BLTOUCH with Z_ENDSTOPS
12oclocker Sep 3, 2025
6f6ff0e
added USE_PROBE_FOR_Z_HOMING_AFTER_Z_ENDSTOP
12oclocker Sep 3, 2025
4c9e1c9
USE_PROBE_FOR_Z_HOMING_AFTER_Z_ENDSTOP added
12oclocker Sep 3, 2025
dcb2410
Added missing pin defines in pins_TRIGORILLA_14.h
12oclocker Sep 3, 2025
c542baf
BugFix for BLTOUCH with Z_ENDSTOPS
12oclocker Sep 4, 2025
3243c80
BugFix for BLTOUCH with Z_ENDSTOPS
12oclocker Sep 4, 2025
ba1b4cd
Added missing pin defines in pins_TRIGORILLA_14.h
12oclocker Sep 4, 2025
b60021c
BugFix for BLTOUCH with Z EndStops
12oclocker Sep 4, 2025
3b79c22
added Z_HOMING_WITH_PROBE_AFTER_Z_ENDSTOP
12oclocker Sep 4, 2025
50d1757
Added Z_HOMING_WITH_PROBE_AFTER_Z_ENDSTOP
12oclocker Sep 4, 2025
a6e16a8
added Z_HOMING_WITH_PROBE_AFTER_Z_ENDSTOP
12oclocker Sep 4, 2025
9723d45
added Z_HOMING_WITH_PROBE_AFTER_Z_ENDSTOP
12oclocker Sep 4, 2025
b5c38c2
added Z_HOMING_WITH_PROBE_AFTER_Z_ENDSTOP
12oclocker Sep 4, 2025
0f19e2d
added Z_HOMING_WITH_PROBE_AFTER_Z_ENDSTOP
12oclocker Sep 4, 2025
bf7a283
BugFix for BLTOUCH with Z EndStops
12oclocker Sep 4, 2025
9703869
BugFix for BLTOUCH with Z EndStops
12oclocker Sep 4, 2025
31afec0
BugFix for BLTOUCH with Z EndStops
12oclocker Sep 4, 2025
0270856
BugFix for BLTOUCH with Z EndStops
12oclocker Sep 4, 2025
b0c6127
added Z_HOMING_WITH_PROBE_AFTER_Z_ENDSTOP
12oclocker Sep 4, 2025
9626616
BugFix for BLTOUCH with Z EndStops
12oclocker Sep 4, 2025
e8af3fe
BugFix for BLTOUCH with Z EndStops
12oclocker Sep 4, 2025
406a4e0
BugFix for BLTOUCH with Z EndStops
12oclocker Sep 5, 2025
91c4ca1
BugFix for Z Probe + Z EndStops
12oclocker Sep 5, 2025
1ca6224
Merge 'bugfix-2.1.x' into pr/28037
thinkyhead Sep 6, 2025
a3c9d00
clean up formatting
thinkyhead Sep 6, 2025
9975a04
Z_HOMING_WITH_PROBE_AFTER_Z_ENDSTOP
12oclocker Sep 6, 2025
c835e82
Z_HOMING_WITH_PROBE_AFTER_Z_ENDSTOP
12oclocker Sep 6, 2025
8a6bc9f
Z_HOMING_WITH_PROBE_AFTER_Z_ENDSTOP
12oclocker Sep 6, 2025
731df1a
Z_HOMING_WITH_PROBE_AFTER_Z_ENDSTOP
12oclocker Sep 6, 2025
0dce7e4
Z_HOMING_WITH_PROBE_AFTER_Z_ENDSTOP
12oclocker Sep 6, 2025
420093e
Z_HOMING_WITH_PROBE_AFTER_Z_ENDSTOP
12oclocker Sep 6, 2025
291f7d7
original
12oclocker Sep 6, 2025
3bfbee5
Z_HOMING_WITH_PROBE_AFTER_Z_ENDSTOP
12oclocker Sep 6, 2025
18680a2
Z_HOMING_WITH_PROBE_AFTER_Z_ENDSTOP
12oclocker Sep 6, 2025
2df563f
Z_HOMING_WITH_PROBE_AFTER_Z_ENDSTOP
12oclocker Sep 8, 2025
489c85e
Merge branch 'MarlinFirmware:bugfix-2.1.x' into bugfix-2.1.x-ZEndStop…
12oclocker Sep 11, 2025
96faa0c
Merge branch 'MarlinFirmware:bugfix-2.1.x' into bugfix-2.1.x-ZEndStop…
12oclocker Sep 23, 2025
21093c5
Merge branch 'MarlinFirmware:bugfix-2.1.x' into bugfix-2.1.x-ZEndStop…
12oclocker Sep 24, 2025
2b503da
Merge branch 'MarlinFirmware:bugfix-2.1.x' into bugfix-2.1.x-ZEndStop…
12oclocker Sep 25, 2025
9c4c746
Merge branch 'MarlinFirmware:bugfix-2.1.x' into bugfix-2.1.x-ZEndStop…
12oclocker Sep 26, 2025
56e84cf
Merge branch 'MarlinFirmware:bugfix-2.1.x' into bugfix-2.1.x-ZEndStop…
12oclocker Sep 26, 2025
de944bf
initial review changes
thinkyhead Sep 27, 2025
a4e283a
less
thinkyhead Sep 28, 2025
266705b
corrections
thinkyhead Sep 28, 2025
f675726
Try home_z_safely
thinkyhead Sep 28, 2025
994b2f5
Merge branch 'bugfix-2.1.x' into bugfix-2.1.x-ZEndStopWithBltouchFix
12oclocker Oct 8, 2025
06a1082
fixed conflict with base Marlin-bugfix-2.1.x
12oclocker Oct 8, 2025
feaaaa3
Merge branch 'MarlinFirmware:bugfix-2.1.x' into bugfix-2.1.x-ZEndStop…
12oclocker Oct 9, 2025
8ee24cf
REHOME_Z_WITH_PROBE optimizations
12oclocker Oct 9, 2025
5fb80c6
REHOME_Z_WITH_PROBE optimizations
12oclocker Oct 9, 2025
bcb0da7
REHOME_Z_WITH_PROBE optimizations
12oclocker Oct 9, 2025
3cea6f0
REHOME_Z_WITH_PROBE optimizations
12oclocker Oct 9, 2025
11f4013
REHOME_Z_WITH_PROBE optimizations
12oclocker Oct 9, 2025
a7e5bff
REHOME_Z_WITH_PROBE optimizations
12oclocker Oct 9, 2025
b7ef64f
REHOME_Z_WITH_PROBE optimizations
12oclocker Oct 9, 2025
748241c
REHOME_Z_WITH_PROBE optimizations
12oclocker Oct 9, 2025
0a8e135
REHOME_Z_WITH_PROBE optimizations
12oclocker Oct 9, 2025
37f595f
REHOME_Z_WITH_PROBE optimizations
12oclocker Oct 9, 2025
6d3e377
REHOME_Z_WITH_PROBE optimizations
12oclocker Oct 9, 2025
33c67c9
Merge branch 'MarlinFirmware:bugfix-2.1.x' into bugfix-2.1.x-ZEndStop…
12oclocker Oct 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1415,6 +1415,15 @@
// Force the use of the probe for Z-axis homing
//#define USE_PROBE_FOR_Z_HOMING

/**
* For machines with Z endstop(s) and a reliable Z probe this option will
* cause Z to home first using Z endstop and then re-home with the probe
* to establish a more ideal Z0 position for probing the bed. This can be
* useful when Z must home to MAX but you want to establish a better Z0
* based on bed height. Requires a probe and calibrated probe Z offset.
*/
//#define REHOME_Z_WITH_PROBE

/**
* Z_MIN_PROBE_PIN
*
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/feature/powerloss.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ uint32_t PrintJobRecovery::cmd_sdpos, // = 0
#include "../module/printcounter.h"
#include "../module/temperature.h"

#if HOMING_Z_WITH_PROBE
#if Z_CAN_HOME_WITH_PROBE
#include "../module/probe.h"
#endif

Expand Down Expand Up @@ -470,7 +470,7 @@ void PrintJobRecovery::resume() {

#if HOMING_Z_DOWN
// Move to a safe XY position and home Z while avoiding the print.
const xy_pos_t p = xy_pos_t(POWER_LOSS_ZHOME_POS) TERN_(HOMING_Z_WITH_PROBE, - probe.offset_xy);
const xy_pos_t p = xy_pos_t(POWER_LOSS_ZHOME_POS) TERN_(Z_CAN_HOME_WITH_PROBE, - probe.offset_xy);
PROCESS_SUBCOMMANDS_NOW(TS(F("G1F1000X"), p_float_t(p.x, 3), 'Y', p_float_t(p.y, 3), F("\nG28HZ")));
#endif

Expand Down
8 changes: 5 additions & 3 deletions Marlin/src/gcode/calibrate/G28.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
constexpr xy_float_t safe_homing_xy = { Z_SAFE_HOMING_X_POINT, Z_SAFE_HOMING_Y_POINT };
destination.set(safe_homing_xy, current_position.z);

TERN_(HOMING_Z_WITH_PROBE, destination -= probe.offset_xy);
TERN_(Z_CAN_HOME_WITH_PROBE, destination -= probe.offset_xy);

if (position_is_reachable(destination)) {

Expand Down Expand Up @@ -384,7 +384,7 @@ void GcodeSuite::G28() {
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("R0 = No Z raise");
}
else {
bool with_probe = ENABLED(HOMING_Z_WITH_PROBE);
bool with_probe = ENABLED(Z_CAN_HOME_WITH_PROBE);
// Raise above the current Z (which should be synced in the planner)
// The "height" for Z is a coordinate. But if Z is not trusted/homed make it relative.
if (seenR || !(z_min_trusted || axis_should_home(Z_AXIS))) {
Expand Down Expand Up @@ -473,7 +473,9 @@ void GcodeSuite::G28() {
stepper.set_separate_multi_axis(false);
#endif

#if ENABLED(Z_SAFE_HOMING)
// Use Safe Homing for Z unless re-homing with probe.
// Assume that it only applies to the probe-homing step.
#if ENABLED(Z_SAFE_HOMING) && DISABLED(REHOME_Z_WITH_PROBE)
// H means hold the current X/Y position when probing.
// Otherwise move to the define safe X/Y position before homing Z.
if (!parser.seen_test('H'))
Expand Down
9 changes: 8 additions & 1 deletion Marlin/src/inc/Conditionals-3-etc.h
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,14 @@
#define NEED_Z_MIN_PROBE_PIN 1
#endif
#if Z_HOME_TO_MIN && (!NEED_Z_MIN_PROBE_PIN || ENABLED(USE_PROBE_FOR_Z_HOMING))
#define HOMING_Z_WITH_PROBE 1
#define HOMING_Z_WITH_PROBE 1 // Always home Z with probe
#endif
#if ANY(HOMING_Z_WITH_PROBE, REHOME_Z_WITH_PROBE)
#define Z_CAN_HOME_WITH_PROBE 1 // Can home Z with probe or endstop
#endif
#ifdef REHOME_Z_WITH_PROBE
#undef REHOME_Z_WITH_PROBE
#define REHOME_Z_WITH_PROBE 1 // ensure a value of 1 so we can use with #elif and TERN
#endif
#if DISABLED(NOZZLE_AS_PROBE)
#define HAS_PROBE_XY_OFFSET 1
Expand Down
1 change: 1 addition & 0 deletions Marlin/src/inc/Conditionals-4-adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@
#undef ENABLE_LEVELING_FADE_HEIGHT
#undef HOME_Z_FIRST
#undef HOMING_Z_WITH_PROBE
#undef REHOME_Z_WITH_PROBE
#undef INPUT_SHAPING_Z
#undef NUM_Z_STEPPERS
#undef SAFE_BED_LEVELING_START_Z
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/inc/Conditionals-5-post.h
Original file line number Diff line number Diff line change
Expand Up @@ -1467,7 +1467,7 @@
#endif

// Disable Z axis sensorless homing if a probe is used to home the Z axis
#if HOMING_Z_WITH_PROBE
#if Z_CAN_HOME_WITH_PROBE
#undef Z_STALL_SENSITIVITY
#undef Z2_STALL_SENSITIVITY
#undef Z3_STALL_SENSITIVITY
Expand Down
2 changes: 2 additions & 0 deletions Marlin/src/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -2557,6 +2557,8 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i
#error "Z_HOME_DIR must be -1 when homing Z with the probe."
#elif ALL(USE_PROBE_FOR_Z_HOMING, HOME_Z_FIRST)
#error "HOME_Z_FIRST can't be used when homing Z with a probe."
#elif ALL(HOMING_Z_WITH_PROBE, REHOME_Z_WITH_PROBE)
#error "HOMING_Z_WITH_PROBE and REHOME_Z_WITH_PROBE are mutually-exclusive."
#endif

#if Z_HOME_TO_MAX && defined(Z_AFTER_HOMING) && DISABLED(ALLOW_Z_AFTER_HOMING)
Expand Down
4 changes: 4 additions & 0 deletions Marlin/src/inc/Warnings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,10 @@
#error "Z_SAFE_HOMING is recommended when homing with a probe. (Enable Z_SAFE_HOMING or define NO_Z_SAFE_HOMING_WARNING to suppress this warning.)"
#endif

#if REHOME_Z_WITH_PROBE && IS_CARTESIAN && NONE(Z_SAFE_HOMING, NO_Z_SAFE_HOMING_WARNING)
#error "Z_SAFE_HOMING is recommended when re-homing with a probe. (Enable Z_SAFE_HOMING or define NO_Z_SAFE_HOMING_WARNING to suppress this warning.)"
#endif

#if HAS_TRINAMIC_CONFIG && NONE(EDGE_STEPPING, NO_EDGE_STEPPING_WARNING)
#error "EDGE_STEPPING is strongly recommended with Trinamic stepper drivers. (Enable EDGE_STEPPING or define NO_EDGE_STEPPING_WARNING to suppress this warning.)"
#endif
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/lcd/extui/mks_ui/draw_z_offset_wizard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) {
SET_SOFT_ENDSTOP_LOOSE(false);
TERN_(HAS_LEVELING, set_bed_leveling_enabled(mks_leveling_was_active));
// On cancel the Z position needs correction
#if HOMING_Z_WITH_PROBE && defined(PROBE_OFFSET_WIZARD_START_Z)
#if Z_CAN_HOME_WITH_PROBE && defined(PROBE_OFFSET_WIZARD_START_Z)
set_axis_never_homed(Z_AXIS);
queue.inject_P(PSTR("G28Z"));
#else
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/lcd/menu/menu_probe_offset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void probe_offset_wizard_menu() {
ACTION_ITEM(MSG_BUTTON_CANCEL, []{
set_offset_and_go_back(z_offset_backup);
// On cancel the Z position needs correction
#if HOMING_Z_WITH_PROBE && defined(PROBE_OFFSET_WIZARD_START_Z)
#if Z_CAN_HOME_WITH_PROBE && defined(PROBE_OFFSET_WIZARD_START_Z)
set_axis_never_homed(Z_AXIS);
queue.inject(F("G28Z"));
#else
Expand All @@ -104,7 +104,7 @@ void probe_offset_wizard_menu() {
* 3. Go to the probe_offset_wizard_menu() screen for Z position adjustment to acquire Z0.
*/
void prepare_for_probe_offset_wizard() {
#if defined(PROBE_OFFSET_WIZARD_XY_POS) || !HOMING_Z_WITH_PROBE
#if defined(PROBE_OFFSET_WIZARD_XY_POS) || !Z_CAN_HOME_WITH_PROBE
if (ui.should_draw()) MenuItem_static::draw(1, GET_TEXT_F(MSG_PROBE_WIZARD_PROBING));

if (ui.wait_for_move) return;
Expand Down
Loading