Commit b62c329e authored by MagoKimbra's avatar MagoKimbra

Fix ENDSTOP_PULLUP

parent 967340be
...@@ -14,9 +14,11 @@ ...@@ -14,9 +14,11 @@
//#define ENDSTOPPULLUP_XMIN //#define ENDSTOPPULLUP_XMIN
//#define ENDSTOPPULLUP_YMIN //#define ENDSTOPPULLUP_YMIN
//#define ENDSTOPPULLUP_ZMIN //#define ENDSTOPPULLUP_ZMIN
//#define ENDSTOPPULLUP_Z2MIN
//#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_XMAX
//#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_YMAX
//#define ENDSTOPPULLUP_ZMAX //#define ENDSTOPPULLUP_ZMAX
//#define ENDSTOPPULLUP_Z2MAX
//#define ENDSTOPPULLUP_ZPROBE //#define ENDSTOPPULLUP_ZPROBE
//#define ENDSTOPPULLUP_EMIN //#define ENDSTOPPULLUP_EMIN
#endif #endif
...@@ -26,12 +28,12 @@ ...@@ -26,12 +28,12 @@
#define Y_MIN_ENDSTOP_LOGIC false // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_LOGIC false // set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_LOGIC false // set to true to invert the logic of the endstop. #define Z_MIN_ENDSTOP_LOGIC false // set to true to invert the logic of the endstop.
#define Z2_MIN_ENDSTOP_LOGIC false // set to true to invert the logic of the endstop. #define Z2_MIN_ENDSTOP_LOGIC false // set to true to invert the logic of the endstop.
#define E_MIN_ENDSTOP_LOGIC false // set to true to invert the logic of the endstop.
#define X_MAX_ENDSTOP_LOGIC false // set to true to invert the logic of the endstop. #define X_MAX_ENDSTOP_LOGIC false // set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_LOGIC false // set to true to invert the logic of the endstop. #define Y_MAX_ENDSTOP_LOGIC false // set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_LOGIC false // set to true to invert the logic of the endstop. #define Z_MAX_ENDSTOP_LOGIC false // set to true to invert the logic of the endstop.
#define Z2_MAX_ENDSTOP_LOGIC false // set to true to invert the logic of the endstop. #define Z2_MAX_ENDSTOP_LOGIC false // set to true to invert the logic of the endstop.
#define Z_PROBE_ENDSTOP_LOGIC false // set to true to invert the logic of the endstop. #define Z_PROBE_ENDSTOP_LOGIC false // set to true to invert the logic of the endstop.
#define E_MIN_ENDSTOP_LOGIC false // set to true to invert the logic of the endstop.
// ENDSTOP SETTINGS: // ENDSTOP SETTINGS:
// Sets direction of endstop when homing; 1=MAX, -1=MIN // Sets direction of endstop when homing; 1=MAX, -1=MIN
......
...@@ -14,9 +14,11 @@ ...@@ -14,9 +14,11 @@
//#define ENDSTOPPULLUP_XMIN //#define ENDSTOPPULLUP_XMIN
//#define ENDSTOPPULLUP_YMIN //#define ENDSTOPPULLUP_YMIN
//#define ENDSTOPPULLUP_ZMIN //#define ENDSTOPPULLUP_ZMIN
//#define ENDSTOPPULLUP_Z2MIN
//#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_XMAX
//#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_YMAX
//#define ENDSTOPPULLUP_ZMAX //#define ENDSTOPPULLUP_ZMAX
//#define ENDSTOPPULLUP_Z2MAX
//#define ENDSTOPPULLUP_ZPROBE //#define ENDSTOPPULLUP_ZPROBE
//#define ENDSTOPPULLUP_EMIN //#define ENDSTOPPULLUP_EMIN
#endif #endif
...@@ -26,12 +28,12 @@ ...@@ -26,12 +28,12 @@
#define Y_MIN_ENDSTOP_LOGIC false // set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_LOGIC false // set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_LOGIC false // set to true to invert the logic of the endstop. #define Z_MIN_ENDSTOP_LOGIC false // set to true to invert the logic of the endstop.
#define Z2_MIN_ENDSTOP_LOGIC false // set to true to invert the logic of the endstop. #define Z2_MIN_ENDSTOP_LOGIC false // set to true to invert the logic of the endstop.
#define E_MIN_ENDSTOP_LOGIC false // set to true to invert the logic of the endstop.
#define X_MAX_ENDSTOP_LOGIC false // set to true to invert the logic of the endstop. #define X_MAX_ENDSTOP_LOGIC false // set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_LOGIC false // set to true to invert the logic of the endstop. #define Y_MAX_ENDSTOP_LOGIC false // set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_LOGIC false // set to true to invert the logic of the endstop. #define Z_MAX_ENDSTOP_LOGIC false // set to true to invert the logic of the endstop.
#define Z2_MAX_ENDSTOP_LOGIC false // set to true to invert the logic of the endstop. #define Z2_MAX_ENDSTOP_LOGIC false // set to true to invert the logic of the endstop.
#define Z_PROBE_ENDSTOP_LOGIC false // set to true to invert the logic of the endstop. #define Z_PROBE_ENDSTOP_LOGIC false // set to true to invert the logic of the endstop.
#define E_MIN_ENDSTOP_LOGIC false // set to true to invert the logic of the endstop.
// ENDSTOP SETTINGS: // ENDSTOP SETTINGS:
// Sets direction of endstop when homing; 1=MAX, -1=MIN // Sets direction of endstop when homing; 1=MAX, -1=MIN
......
...@@ -152,17 +152,7 @@ ...@@ -152,17 +152,7 @@
// Play a little bit with small adjustments (0.5mm) and check the behaviour. // Play a little bit with small adjustments (0.5mm) and check the behaviour.
// The M119 (endstops report) will start reporting the Z2 Endstop as well. // The M119 (endstops report) will start reporting the Z2 Endstop as well.
#define Z2_STEP_PIN E2_STEP_PIN // Stepper to be used to Z2 axis. //#define Z_DUAL_ENDSTOPS
#define Z2_DIR_PIN E2_DIR_PIN
#define Z2_ENABLE_PIN E2_ENABLE_PIN
// #define Z_DUAL_ENDSTOPS
#if ENABLED(Z_DUAL_ENDSTOPS)
#define Z2_MAX_PIN 36 //Endstop used for Z2 axis. In this case I'm using XMAX in a Rumba Board (pin 36)
const bool Z2_MAX_ENDSTOP_INVERTING = false;
#define DISABLE_XMAX_ENDSTOP //Better to disable the XMAX to avoid conflict. Just rename "XMAX_ENDSTOP" by the endstop you are using for Z2 axis.
#endif
#endif // Z_DUAL_STEPPER_DRIVERS #endif // Z_DUAL_STEPPER_DRIVERS
......
...@@ -257,14 +257,16 @@ ...@@ -257,14 +257,16 @@
* ENDSTOPPULLUPS * ENDSTOPPULLUPS
*/ */
#if ENABLED(ENDSTOPPULLUPS) #if ENABLED(ENDSTOPPULLUPS)
#define ENDSTOPPULLUP_XMAX
#define ENDSTOPPULLUP_YMAX
#define ENDSTOPPULLUP_ZMAX
#define ENDSTOPPULLUP_XMIN #define ENDSTOPPULLUP_XMIN
#define ENDSTOPPULLUP_YMIN #define ENDSTOPPULLUP_YMIN
#define ENDSTOPPULLUP_ZMIN #define ENDSTOPPULLUP_ZMIN
#define ENDSTOPPULLUP_EMIN #define ENDSTOPPULLUP_Z2MIN
#define ENDSTOPPULLUP_XMAX
#define ENDSTOPPULLUP_YMAX
#define ENDSTOPPULLUP_ZMAX
#define ENDSTOPPULLUP_Z2MAX
#define ENDSTOPPULLUP_ZPROBE #define ENDSTOPPULLUP_ZPROBE
#define ENDSTOPPULLUP_EMIN
#endif #endif
/** /**
......
...@@ -965,6 +965,13 @@ void st_init() { ...@@ -965,6 +965,13 @@ void st_init() {
#endif #endif
#endif #endif
#if HAS_Z2_MIN
SET_INPUT(Z2_MIN_PIN);
#if ENABLED(ENDSTOPPULLUP_Z2MIN)
WRITE(Z2_MIN_PIN,HIGH);
#endif
#endif
#if HAS_E_MIN #if HAS_E_MIN
SET_INPUT(E_MIN_PIN); SET_INPUT(E_MIN_PIN);
#if ENABLED(ENDSTOPPULLUP_EMIN) #if ENABLED(ENDSTOPPULLUP_EMIN)
...@@ -995,7 +1002,7 @@ void st_init() { ...@@ -995,7 +1002,7 @@ void st_init() {
#if HAS_Z2_MAX #if HAS_Z2_MAX
SET_INPUT(Z2_MAX_PIN); SET_INPUT(Z2_MAX_PIN);
#if ENABLED(ENDSTOPPULLUP_ZMAX) #if ENABLED(ENDSTOPPULLUP_Z2MAX)
WRITE(Z2_MAX_PIN,HIGH); WRITE(Z2_MAX_PIN,HIGH);
#endif #endif
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment