From accabf088ac025bfbc31a3b28162a4a5b5693d8f Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 29 Oct 2016 01:54:02 -0500 Subject: [PATCH] Add support for Z2 min endstop to M119 --- Marlin/endstops.cpp | 4 ++++ Marlin/language.h | 1 + 2 files changed, 5 insertions(+) diff --git a/Marlin/endstops.cpp b/Marlin/endstops.cpp index 7c0c9dbac..c6c94b87c 100644 --- a/Marlin/endstops.cpp +++ b/Marlin/endstops.cpp @@ -201,6 +201,10 @@ void Endstops::M119() { SERIAL_PROTOCOLPGM(MSG_Z_MIN); SERIAL_PROTOCOLLN(((READ(Z_MIN_PIN)^Z_MIN_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN)); #endif + #if HAS_Z2_MIN + SERIAL_PROTOCOLPGM(MSG_Z2_MIN); + SERIAL_PROTOCOLLN(((READ(Z2_MIN_PIN)^Z2_MIN_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN)); + #endif #if HAS_Z_MAX SERIAL_PROTOCOLPGM(MSG_Z_MAX); SERIAL_PROTOCOLLN(((READ(Z_MAX_PIN)^Z_MAX_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN)); diff --git a/Marlin/language.h b/Marlin/language.h index 0a9776494..96de16375 100644 --- a/Marlin/language.h +++ b/Marlin/language.h @@ -145,6 +145,7 @@ #define MSG_Y_MAX "y_max: " #define MSG_Z_MIN "z_min: " #define MSG_Z_MAX "z_max: " +#define MSG_Z2_MIN "z2_min: " #define MSG_Z2_MAX "z2_max: " #define MSG_Z_PROBE "z_probe: " #define MSG_ERR_MATERIAL_INDEX "M145 S out of range (0-1)"