Make Z_PROBE a Z_MIN_PROBE (PR#65)

Currently we use the probe exclusively as a device to find the build platform(bed).
For the currently supported setups this means, we use it as a additional min-endstop.
A triggered when not deployed probe disturbs the homing process for max-endstops.

Rename ENDSTOPPULLUP_ZPROBE to ENDSTOPPULLUP_ZMIN_PROBE
Rename Z_PROBE_ENDSTOP_INVERTING to Z_MIN_PROBE_ENDSTOP_INVERTING
Rename Z_PROBE_ENDSTOP to Z_MIN_PROBE_ENDSTOP
Rename DISABLE_Z_PROBE_ENDSTOP to DISABLE_Z_MIN_PROBE_ENDSTOP
Rename Z_PROBE_REPEATABILITY_TEST to Z_MIN_PROBE_REPEATABILITY_TEST
Rename Z_PROBE_ENDSTOP to Z_MIN_PROBE_ENDSTOP
Adjust comments accordingly
Remove Z_MAX  check for the probe in update_endstops().

Using an delta related idea of @clefranc from #61,
extended to the general change for all setups.

Tested with Prusa i3, max-z-endstop and permanently triggered z-probe.
Worked for @clefranc's delta.
This commit is contained in:
AnHardt
2015-08-10 10:35:39 +02:00
committed by Richard Wackerbarth
parent 8d23c4230e
commit e2d69f66b2
25 changed files with 181 additions and 191 deletions

View File

@ -263,7 +263,7 @@ void checkHitEndstops() {
SERIAL_ECHOPAIR(" Z:", (float)endstops_trigsteps[Z_AXIS] / axis_steps_per_unit[Z_AXIS]);
LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "Z");
}
#if ENABLED(Z_PROBE_ENDSTOP)
#if ENABLED(Z_MIN_PROBE_ENDSTOP)
if (endstop_hit_bits & BIT(Z_PROBE)) {
SERIAL_ECHOPAIR(" Z_PROBE:", (float)endstops_trigsteps[Z_AXIS] / axis_steps_per_unit[Z_AXIS]);
LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "ZP");
@ -411,7 +411,7 @@ inline void update_endstops() {
#endif // !Z_DUAL_ENDSTOPS
#endif // Z_MIN_PIN
#if ENABLED(Z_PROBE_ENDSTOP)
#if ENABLED(Z_MIN_PROBE_ENDSTOP)
UPDATE_ENDSTOP(Z, PROBE);
if (TEST_ENDSTOP(Z_PROBE))
@ -448,16 +448,6 @@ inline void update_endstops() {
#endif // !Z_DUAL_ENDSTOPS
#endif // Z_MAX_PIN
#if ENABLED(Z_PROBE_ENDSTOP)
UPDATE_ENDSTOP(Z, PROBE);
if (TEST_ENDSTOP(Z_PROBE))
{
endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS];
endstop_hit_bits |= BIT(Z_PROBE);
}
#endif
}
#if ENABLED(COREXZ)
}
@ -981,10 +971,10 @@ void st_init() {
#endif
#endif
#if HAS_Z_PROBE && ENABLED(Z_PROBE_ENDSTOP) // Check for Z_PROBE_ENDSTOP so we don't pull a pin high unless it's to be used.
SET_INPUT(Z_PROBE_PIN);
#if HAS_Z_PROBE && ENABLED(Z_MIN_PROBE_ENDSTOP) // Check for Z_MIN_PROBE_ENDSTOP so we don't pull a pin high unless it's to be used.
SET_INPUT(Z_MIN_PROBE_PIN);
#if ENABLED(ENDSTOPPULLUP_ZPROBE)
WRITE(Z_PROBE_PIN,HIGH);
WRITE(Z_MIN_PROBE_PIN,HIGH);
#endif
#endif