Skip to content

Commit 1c9ccce

Browse files
InsanityAutomationthinkyhead
authored andcommitted
Add NOZZLE_AS_PROBE (no probe offsets) (MarlinFirmware#15929)
1 parent 9c02115 commit 1c9ccce

File tree

151 files changed

+884
-10
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+884
-10
lines changed

Marlin/Configuration.h

+6
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,12 @@
855855
*/
856856
//#define FIX_MOUNTED_PROBE
857857

858+
/**
859+
* Use the nozzle as the probe, as with a conductive
860+
* nozzle system or a piezo-electric smart effector.
861+
*/
862+
//#define NOZZLE_AS_PROBE
863+
858864
/**
859865
* Z Servo Probe, such as an endstop switch on a rotating arm.
860866
*/

Marlin/src/core/utility.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ void safe_delay(millis_t ms) {
5959
SERIAL_ECHOLNPGM("Probe: "
6060
#if ENABLED(PROBE_MANUALLY)
6161
"PROBE_MANUALLY"
62+
#elif ENABLED(NOZZLE_AS_PROBE)
63+
"NOZZLE_AS_PROBE"
6264
#elif ENABLED(FIX_MOUNTED_PROBE)
6365
"FIX_MOUNTED_PROBE"
6466
#elif ENABLED(BLTOUCH)

Marlin/src/gcode/bedlevel/abl/G29.cpp

+5-4
Original file line numberDiff line numberDiff line change
@@ -403,13 +403,14 @@ G29_TYPE GcodeSuite::G29() {
403403
}
404404
else {
405405
probe_position_lf.set(
406-
parser.seenval('L') ? (int)RAW_X_POSITION(parser.value_linear_units()) : _MAX(X_CENTER - (X_BED_SIZE) / 2, x_min),
407-
parser.seenval('F') ? (int)RAW_Y_POSITION(parser.value_linear_units()) : _MAX(Y_CENTER - (Y_BED_SIZE) / 2, y_min)
406+
parser.seenval('L') ? (int)RAW_X_POSITION(parser.value_linear_units()) : (_MAX(x_min, X_CENTER - (X_BED_SIZE) / 2) + MIN_PROBE_EDGE_LEFT),
407+
parser.seenval('F') ? (int)RAW_Y_POSITION(parser.value_linear_units()) : (_MAX(y_min, Y_CENTER - (Y_BED_SIZE) / 2) + MIN_PROBE_EDGE_FRONT)
408408
);
409409
probe_position_rb.set(
410-
parser.seenval('R') ? (int)RAW_X_POSITION(parser.value_linear_units()) : _MIN(probe_position_lf.x + X_BED_SIZE, x_max),
411-
parser.seenval('B') ? (int)RAW_Y_POSITION(parser.value_linear_units()) : _MIN(probe_position_lf.y + Y_BED_SIZE, y_max)
410+
parser.seenval('R') ? (int)RAW_X_POSITION(parser.value_linear_units()) : (_MIN(x_max, probe_position_lf.x + X_BED_SIZE) - MIN_PROBE_EDGE_RIGHT),
411+
parser.seenval('B') ? (int)RAW_Y_POSITION(parser.value_linear_units()) : (_MIN(y_max, probe_position_lf.y + Y_BED_SIZE) - MIN_PROBE_EDGE_BACK)
412412
);
413+
SERIAL_ECHOLN("Set Trail 1");
413414
}
414415

415416
if (

Marlin/src/inc/Conditionals_LCD.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@
496496
/**
497497
* Set flags for enabled probes
498498
*/
499-
#define HAS_BED_PROBE (HAS_Z_SERVO_PROBE || ANY(FIX_MOUNTED_PROBE, TOUCH_MI_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, SOLENOID_PROBE, SENSORLESS_PROBING, RACK_AND_PINION_PROBE))
499+
#define HAS_BED_PROBE (HAS_Z_SERVO_PROBE || ANY(FIX_MOUNTED_PROBE, NOZZLE_AS_PROBE, TOUCH_MI_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, SOLENOID_PROBE, SENSORLESS_PROBING, RACK_AND_PINION_PROBE))
500500
#define PROBE_SELECTED (HAS_BED_PROBE || EITHER(PROBE_MANUALLY, MESH_BED_LEVELING))
501501

502502
#if HAS_BED_PROBE

Marlin/src/inc/Conditionals_post.h

+4
Original file line numberDiff line numberDiff line change
@@ -1483,6 +1483,10 @@
14831483
#undef MIN_PROBE_EDGE_RIGHT
14841484
#undef MIN_PROBE_EDGE_FRONT
14851485
#undef MIN_PROBE_EDGE_BACK
1486+
#define MIN_PROBE_EDGE_LEFT 0
1487+
#define MIN_PROBE_EDGE_RIGHT 0
1488+
#define MIN_PROBE_EDGE_FRONT 0
1489+
#define MIN_PROBE_EDGE_BACK 0
14861490
#else
14871491
#ifndef MIN_PROBE_EDGE_LEFT
14881492
#define MIN_PROBE_EDGE_LEFT MIN_PROBE_EDGE

Marlin/src/inc/SanityCheck.h

+4-3
Original file line numberDiff line numberDiff line change
@@ -1082,6 +1082,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
10821082
#if 1 < 0 \
10831083
+ ENABLED(PROBE_MANUALLY) \
10841084
+ ENABLED(FIX_MOUNTED_PROBE) \
1085+
+ ENABLED(NOZZLE_AS_PROBE) \
10851086
+ (HAS_Z_SERVO_PROBE && DISABLED(BLTOUCH)) \
10861087
+ ENABLED(BLTOUCH) \
10871088
+ ENABLED(TOUCH_MI_PROBE) \
@@ -1090,7 +1091,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
10901091
+ ENABLED(Z_PROBE_SLED) \
10911092
+ ENABLED(RACK_AND_PINION_PROBE) \
10921093
+ ENABLED(SENSORLESS_PROBING)
1093-
#error "Please enable only one probe option: PROBE_MANUALLY, SENSORLESS_PROBING, BLTOUCH, FIX_MOUNTED_PROBE, TOUCH_MI_PROBE, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or Z Servo."
1094+
#error "Please enable only one probe option: PROBE_MANUALLY, SENSORLESS_PROBING, BLTOUCH, FIX_MOUNTED_PROBE, NOZZLE_AS_PROBE, TOUCH_MI_PROBE, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or Z Servo."
10941095
#endif
10951096

10961097
#if HAS_BED_PROBE
@@ -1221,11 +1222,11 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
12211222
* Require some kind of probe for bed leveling and probe testing
12221223
*/
12231224
#if HAS_ABL_NOT_UBL && !PROBE_SELECTED
1224-
#error "Auto Bed Leveling requires one of these: PROBE_MANUALLY, FIX_MOUNTED_PROBE, BLTOUCH, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or a Z Servo."
1225+
#error "Auto Bed Leveling requires one of these: PROBE_MANUALLY, FIX_MOUNTED_PROBE, NOZZLE_AS_PROBE, BLTOUCH, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or a Z Servo."
12251226
#endif
12261227

12271228
#if ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)
1228-
#error "Z_MIN_PROBE_REPEATABILITY_TEST requires a probe: FIX_MOUNTED_PROBE, BLTOUCH, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or Z Servo."
1229+
#error "Z_MIN_PROBE_REPEATABILITY_TEST requires a probe: FIX_MOUNTED_PROBE, NOZZLE_AS_PROBE, BLTOUCH, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or Z Servo."
12291230
#endif
12301231

12311232
#endif

Marlin/src/module/probe.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ bool set_probe_deployed(const bool deploy) {
358358
// Make room for probe to deploy (or stow)
359359
// Fix-mounted probe should only raise for deploy
360360
// unless PAUSE_BEFORE_DEPLOY_STOW is enabled
361-
#if ENABLED(FIX_MOUNTED_PROBE) && DISABLED(PAUSE_BEFORE_DEPLOY_STOW)
361+
#if EITHER(FIX_MOUNTED_PROBE, NOZZLE_AS_PROBE) && DISABLED(PAUSE_BEFORE_DEPLOY_STOW)
362362
const bool deploy_stow_condition = deploy;
363363
#else
364364
constexpr bool deploy_stow_condition = true;

Marlin/src/module/probe.h

+8
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@
8585
return (
8686
#if IS_KINEMATIC
8787
(X_CENTER) - probe_radius()
88+
#elif ENABLED(NOZZLE_AS_PROBE)
89+
_MAX(MIN_PROBE_EDGE_LEFT, X_MIN_POS)
8890
#else
8991
_MAX((X_MIN_BED) + (MIN_PROBE_EDGE_LEFT), (X_MIN_POS) + probe_offset.x)
9092
#endif
@@ -94,6 +96,8 @@
9496
return (
9597
#if IS_KINEMATIC
9698
(X_CENTER) + probe_radius()
99+
#elif ENABLED(NOZZLE_AS_PROBE)
100+
_MAX(MIN_PROBE_EDGE_RIGHT, X_MAX_POS)
97101
#else
98102
_MIN((X_MAX_BED) - (MIN_PROBE_EDGE_RIGHT), (X_MAX_POS) + probe_offset.x)
99103
#endif
@@ -103,6 +107,8 @@
103107
return (
104108
#if IS_KINEMATIC
105109
(Y_CENTER) - probe_radius()
110+
#elif ENABLED(NOZZLE_AS_PROBE)
111+
_MIN(MIN_PROBE_EDGE_FRONT, Y_MIN_POS)
106112
#else
107113
_MAX((Y_MIN_BED) + (MIN_PROBE_EDGE_FRONT), (Y_MIN_POS) + probe_offset.y)
108114
#endif
@@ -112,6 +118,8 @@
112118
return (
113119
#if IS_KINEMATIC
114120
(Y_CENTER) + probe_radius()
121+
#elif ENABLED(NOZZLE_AS_PROBE)
122+
_MAX(MIN_PROBE_EDGE_BACK, Y_MAX_POS)
115123
#else
116124
_MIN((Y_MAX_BED) - (MIN_PROBE_EDGE_BACK), (Y_MAX_POS) + probe_offset.y)
117125
#endif

buildroot/share/tests/LPC1768-tests

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ opt_set TEMP_SENSOR_1 -1
3939
opt_set TEMP_SENSOR_BED 5
4040
opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SDSUPPORT ADAPTIVE_FAN_SLOWING NO_FAN_SLOWING_IN_PID_TUNING \
4141
FILAMENT_WIDTH_SENSOR FILAMENT_LCD_DISPLAY PID_EXTRUSION_SCALING \
42-
FIX_MOUNTED_PROBE AUTO_BED_LEVELING_BILINEAR G29_RETRY_AND_RECOVER Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE \
42+
NOZZLE_AS_PROBE AUTO_BED_LEVELING_BILINEAR G29_RETRY_AND_RECOVER Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE \
4343
BABYSTEPPING BABYSTEP_XY BABYSTEP_ZPROBE_OFFSET BABYSTEP_ZPROBE_GFX_OVERLAY \
4444
PRINTCOUNTER NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE SLOW_PWM_HEATERS PIDTEMPBED EEPROM_SETTINGS INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT \
4545
Z_SAFE_HOMING ADVANCED_PAUSE_FEATURE PARK_HEAD_ON_PAUSE \

config/default/Configuration.h

+6
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,12 @@
855855
*/
856856
//#define FIX_MOUNTED_PROBE
857857

858+
/**
859+
* Use the nozzle as the probe, as with a conductive
860+
* nozzle system or a piezo-electric smart effector.
861+
*/
862+
//#define NOZZLE_AS_PROBE
863+
858864
/**
859865
* Z Servo Probe, such as an endstop switch on a rotating arm.
860866
*/

config/examples/3DFabXYZ/Migbot/Configuration.h

+6
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,12 @@
862862
*/
863863
#define FIX_MOUNTED_PROBE
864864

865+
/**
866+
* Use the nozzle as the probe, as with a conductive
867+
* nozzle system or a piezo-electric smart effector.
868+
*/
869+
//#define NOZZLE_AS_PROBE
870+
865871
/**
866872
* Z Servo Probe, such as an endstop switch on a rotating arm.
867873
*/

config/examples/ADIMLab/Gantry v1/Configuration.h

+6
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,12 @@
855855
*/
856856
//#define FIX_MOUNTED_PROBE
857857

858+
/**
859+
* Use the nozzle as the probe, as with a conductive
860+
* nozzle system or a piezo-electric smart effector.
861+
*/
862+
//#define NOZZLE_AS_PROBE
863+
858864
/**
859865
* Z Servo Probe, such as an endstop switch on a rotating arm.
860866
*/

config/examples/ADIMLab/Gantry v2/Configuration.h

+6
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,12 @@
855855
*/
856856
//#define FIX_MOUNTED_PROBE
857857

858+
/**
859+
* Use the nozzle as the probe, as with a conductive
860+
* nozzle system or a piezo-electric smart effector.
861+
*/
862+
//#define NOZZLE_AS_PROBE
863+
858864
/**
859865
* Z Servo Probe, such as an endstop switch on a rotating arm.
860866
*/

config/examples/AlephObjects/TAZ4/Configuration.h

+6
Original file line numberDiff line numberDiff line change
@@ -875,6 +875,12 @@
875875
*/
876876
#define FIX_MOUNTED_PROBE
877877

878+
/**
879+
* Use the nozzle as the probe, as with a conductive
880+
* nozzle system or a piezo-electric smart effector.
881+
*/
882+
//#define NOZZLE_AS_PROBE
883+
878884
/**
879885
* Z Servo Probe, such as an endstop switch on a rotating arm.
880886
*/

config/examples/Alfawise/U20-bltouch/Configuration.h

+6
Original file line numberDiff line numberDiff line change
@@ -918,6 +918,12 @@
918918
*/
919919
//#define FIX_MOUNTED_PROBE
920920

921+
/**
922+
* Use the nozzle as the probe, as with a conductive
923+
* nozzle system or a piezo-electric smart effector.
924+
*/
925+
//#define NOZZLE_AS_PROBE
926+
921927
/**
922928
* Z Servo Probe, such as an endstop switch on a rotating arm.
923929
*/

config/examples/Alfawise/U20/Configuration.h

+6
Original file line numberDiff line numberDiff line change
@@ -918,6 +918,12 @@
918918
*/
919919
//#define FIX_MOUNTED_PROBE
920920

921+
/**
922+
* Use the nozzle as the probe, as with a conductive
923+
* nozzle system or a piezo-electric smart effector.
924+
*/
925+
//#define NOZZLE_AS_PROBE
926+
921927
/**
922928
* Z Servo Probe, such as an endstop switch on a rotating arm.
923929
*/

config/examples/AliExpress/CL-260/Configuration.h

+6
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,12 @@
855855
*/
856856
//#define FIX_MOUNTED_PROBE
857857

858+
/**
859+
* Use the nozzle as the probe, as with a conductive
860+
* nozzle system or a piezo-electric smart effector.
861+
*/
862+
//#define NOZZLE_AS_PROBE
863+
858864
/**
859865
* Z Servo Probe, such as an endstop switch on a rotating arm.
860866
*/

config/examples/AliExpress/UM2pExt/Configuration.h

+6
Original file line numberDiff line numberDiff line change
@@ -866,6 +866,12 @@
866866
*/
867867
//#define FIX_MOUNTED_PROBE
868868

869+
/**
870+
* Use the nozzle as the probe, as with a conductive
871+
* nozzle system or a piezo-electric smart effector.
872+
*/
873+
//#define NOZZLE_AS_PROBE
874+
869875
/**
870876
* Z Servo Probe, such as an endstop switch on a rotating arm.
871877
*/

config/examples/Anet/A2/Configuration.h

+6
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,12 @@
855855
*/
856856
//#define FIX_MOUNTED_PROBE
857857

858+
/**
859+
* Use the nozzle as the probe, as with a conductive
860+
* nozzle system or a piezo-electric smart effector.
861+
*/
862+
//#define NOZZLE_AS_PROBE
863+
858864
/**
859865
* Z Servo Probe, such as an endstop switch on a rotating arm.
860866
*/

config/examples/Anet/A2plus/Configuration.h

+6
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,12 @@
855855
*/
856856
//#define FIX_MOUNTED_PROBE
857857

858+
/**
859+
* Use the nozzle as the probe, as with a conductive
860+
* nozzle system or a piezo-electric smart effector.
861+
*/
862+
//#define NOZZLE_AS_PROBE
863+
858864
/**
859865
* Z Servo Probe, such as an endstop switch on a rotating arm.
860866
*/

config/examples/Anet/A6/Configuration.h

+6
Original file line numberDiff line numberDiff line change
@@ -896,6 +896,12 @@
896896
*/
897897
//#define FIX_MOUNTED_PROBE
898898

899+
/**
900+
* Use the nozzle as the probe, as with a conductive
901+
* nozzle system or a piezo-electric smart effector.
902+
*/
903+
//#define NOZZLE_AS_PROBE
904+
899905
/**
900906
* Z Servo Probe, such as an endstop switch on a rotating arm.
901907
*/

config/examples/Anet/A8/Configuration.h

+6
Original file line numberDiff line numberDiff line change
@@ -868,6 +868,12 @@
868868
*/
869869
//#define FIX_MOUNTED_PROBE
870870

871+
/**
872+
* Use the nozzle as the probe, as with a conductive
873+
* nozzle system or a piezo-electric smart effector.
874+
*/
875+
//#define NOZZLE_AS_PROBE
876+
871877
/**
872878
* Z Servo Probe, such as an endstop switch on a rotating arm.
873879
*/

config/examples/Anet/A8plus/Configuration.h

+6
Original file line numberDiff line numberDiff line change
@@ -866,6 +866,12 @@
866866
*/
867867
//#define FIX_MOUNTED_PROBE
868868

869+
/**
870+
* Use the nozzle as the probe, as with a conductive
871+
* nozzle system or a piezo-electric smart effector.
872+
*/
873+
//#define NOZZLE_AS_PROBE
874+
869875
/**
870876
* Z Servo Probe, such as an endstop switch on a rotating arm.
871877
*/

config/examples/Anet/E16/Configuration.h

+6
Original file line numberDiff line numberDiff line change
@@ -867,6 +867,12 @@
867867
*/
868868
//#define FIX_MOUNTED_PROBE
869869

870+
/**
871+
* Use the nozzle as the probe, as with a conductive
872+
* nozzle system or a piezo-electric smart effector.
873+
*/
874+
//#define NOZZLE_AS_PROBE
875+
870876
/**
871877
* Z Servo Probe, such as an endstop switch on a rotating arm.
872878
*/

config/examples/AnyCubic/i3/Configuration.h

+6
Original file line numberDiff line numberDiff line change
@@ -865,6 +865,12 @@
865865
*/
866866
//#define FIX_MOUNTED_PROBE
867867

868+
/**
869+
* Use the nozzle as the probe, as with a conductive
870+
* nozzle system or a piezo-electric smart effector.
871+
*/
872+
//#define NOZZLE_AS_PROBE
873+
868874
/**
869875
* Z Servo Probe, such as an endstop switch on a rotating arm.
870876
*/

config/examples/ArmEd/Configuration.h

+6
Original file line numberDiff line numberDiff line change
@@ -856,6 +856,12 @@
856856
*/
857857
//#define FIX_MOUNTED_PROBE
858858

859+
/**
860+
* Use the nozzle as the probe, as with a conductive
861+
* nozzle system or a piezo-electric smart effector.
862+
*/
863+
//#define NOZZLE_AS_PROBE
864+
859865
/**
860866
* Z Servo Probe, such as an endstop switch on a rotating arm.
861867
*/

config/examples/Azteeg/X5GT/Configuration.h

+6
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,12 @@
855855
*/
856856
//#define FIX_MOUNTED_PROBE
857857

858+
/**
859+
* Use the nozzle as the probe, as with a conductive
860+
* nozzle system or a piezo-electric smart effector.
861+
*/
862+
//#define NOZZLE_AS_PROBE
863+
858864
/**
859865
* Z Servo Probe, such as an endstop switch on a rotating arm.
860866
*/

config/examples/BIBO/TouchX/cyclops/Configuration.h

+6
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,12 @@
855855
*/
856856
//#define FIX_MOUNTED_PROBE
857857

858+
/**
859+
* Use the nozzle as the probe, as with a conductive
860+
* nozzle system or a piezo-electric smart effector.
861+
*/
862+
//#define NOZZLE_AS_PROBE
863+
858864
/**
859865
* Z Servo Probe, such as an endstop switch on a rotating arm.
860866
*/

0 commit comments

Comments
 (0)