Bug fixes for Z_PROBE_AND_ENDSTOP.

Code cleanup for Z_PROBE_AND_ENDSTOP.
Added Z_PROBE_PIN to pins_RAMPS_13.h
This commit is contained in:
Chris Roadfeldt
2015-03-29 02:16:09 -05:00
parent 059052889f
commit 324c14943b
4 changed files with 15 additions and 21 deletions

View File

@ -1359,8 +1359,13 @@ static void retract_z_probe() {
st_synchronize();
#if defined(Z_PROBE_AND_ENDSTOP)
bool z_probe_endstop = (READ(Z_PROBE_PIN) != Z_PROBE_ENDSTOP_INVERTING);
if (z_probe_endstop)
#else
bool z_min_endstop = (READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING);
if (!z_min_endstop)
if (z_min_endstop)
#endif
{
if (!Stopped)
{
@ -3516,7 +3521,7 @@ inline void gcode_M119() {
#endif
#if defined(Z_PROBE_PIN) && Z_PROBE_PIN >-1
SERIAL_PROTOCOLPGM(MSG_Z_PROBE);
SERIALPROTOCOLLN(((READ(Z_PROBE_PIN)^72Z_PROBE_ENDSTOP_INVERTING)?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN));
SERIAL_PROTOCOLLN(((READ(Z_PROBE_PIN)^Z_PROBE_ENDSTOP_INVERTING)?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN));
#endif
}