Add HAS_EXTRA_ENDSTOPS macro

This commit is contained in:
Scott Lahteine 2019-02-06 04:59:22 -06:00
parent 3c49396370
commit 1bd9a63049
9 changed files with 14 additions and 13 deletions

View File

@ -641,7 +641,7 @@
#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
/** /**
* Stepper Drivers * Stepper Drivers

View File

@ -22,7 +22,7 @@
#include "../../inc/MarlinConfig.h" #include "../../inc/MarlinConfig.h"
#if ENABLED(DELTA) || ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS #if ENABLED(DELTA) || HAS_EXTRA_ENDSTOPS
#include "../gcode.h" #include "../gcode.h"
@ -59,7 +59,7 @@
#endif #endif
} }
#elif ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS #elif HAS_EXTRA_ENDSTOPS
#include "../../module/endstops.h" #include "../../module/endstops.h"
@ -107,6 +107,6 @@
} }
} }
#endif // X_DUAL_ENDSTOPS || Y_DUAL_ENDSTOPS || Z_DUAL_ENDSTOPS #endif // HAS_EXTRA_ENDSTOPS
#endif // DELTA || X_DUAL_ENDSTOPS || Y_DUAL_ENDSTOPS || Z_DUAL_ENDSTOPS #endif // DELTA || HAS_EXTRA_ENDSTOPS

View File

@ -759,7 +759,7 @@ private:
static void M665(); static void M665();
#endif #endif
#if ENABLED(DELTA) || ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS #if ENABLED(DELTA) || HAS_EXTRA_ENDSTOPS
static void M666(); static void M666();
#endif #endif

View File

@ -635,7 +635,7 @@ inline void get_serial_commands() {
gcode_LastN = gcode_N; gcode_LastN = gcode_N;
} }
#if ENABLED(SDSUPPORT) #if ENABLED(SDSUPPORT)
// Pronterface "M29" and "M29 " has no line number // Pronterface "M29" and "M29 " has no line number
else if (card.flag.saving && !is_M29(command)) else if (card.flag.saving && !is_M29(command))
return gcode_line_error(PSTR(MSG_ERR_NO_CHECKSUM), i); return gcode_line_error(PSTR(MSG_ERR_NO_CHECKSUM), i);
#endif #endif

View File

@ -529,6 +529,7 @@
#define Z_MULTI_STEPPER_DRIVERS (ENABLED(Z_DUAL_STEPPER_DRIVERS) || ENABLED(Z_TRIPLE_STEPPER_DRIVERS)) #define Z_MULTI_STEPPER_DRIVERS (ENABLED(Z_DUAL_STEPPER_DRIVERS) || ENABLED(Z_TRIPLE_STEPPER_DRIVERS))
#define Z_MULTI_ENDSTOPS (ENABLED(Z_DUAL_ENDSTOPS) || ENABLED(Z_TRIPLE_ENDSTOPS)) #define Z_MULTI_ENDSTOPS (ENABLED(Z_DUAL_ENDSTOPS) || ENABLED(Z_TRIPLE_ENDSTOPS))
#define HAS_EXTRA_ENDSTOPS (ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS)
#define IS_SCARA (ENABLED(MORGAN_SCARA) || ENABLED(MAKERARM_SCARA)) #define IS_SCARA (ENABLED(MORGAN_SCARA) || ENABLED(MAKERARM_SCARA))
#define IS_KINEMATIC (ENABLED(DELTA) || IS_SCARA) #define IS_KINEMATIC (ENABLED(DELTA) || IS_SCARA)

View File

@ -50,7 +50,7 @@ class Endstops {
public: public:
#if ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS #if HAS_EXTRA_ENDSTOPS
typedef uint16_t esbits_t; typedef uint16_t esbits_t;
#if ENABLED(X_DUAL_ENDSTOPS) #if ENABLED(X_DUAL_ENDSTOPS)
static float x2_endstop_adj; static float x2_endstop_adj;

View File

@ -1421,7 +1421,7 @@ void homeaxis(const AxisEnum axis) {
#endif #endif
// Set flags for X, Y, Z motor locking // Set flags for X, Y, Z motor locking
#if ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS #if HAS_EXTRA_ENDSTOPS
switch (axis) { switch (axis) {
#if ENABLED(X_DUAL_ENDSTOPS) #if ENABLED(X_DUAL_ENDSTOPS)
case X_AXIS: case X_AXIS:
@ -1499,7 +1499,7 @@ void homeaxis(const AxisEnum axis) {
#endif #endif
} }
#if ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS #if HAS_EXTRA_ENDSTOPS
const bool pos_dir = axis_home_dir > 0; const bool pos_dir = axis_home_dir > 0;
#if ENABLED(X_DUAL_ENDSTOPS) #if ENABLED(X_DUAL_ENDSTOPS)
if (axis == X_AXIS) { if (axis == X_AXIS) {

View File

@ -119,7 +119,7 @@ Stepper stepper; // Singleton
// public: // public:
#if ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS || ENABLED(Z_STEPPER_AUTO_ALIGN) #if HAS_EXTRA_ENDSTOPS || ENABLED(Z_STEPPER_AUTO_ALIGN)
bool Stepper::separate_multi_axis = false; bool Stepper::separate_multi_axis = false;
#endif #endif

View File

@ -230,7 +230,7 @@ class Stepper {
public: public:
#if ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS || ENABLED(Z_STEPPER_AUTO_ALIGN) #if HAS_EXTRA_ENDSTOPS || ENABLED(Z_STEPPER_AUTO_ALIGN)
static bool separate_multi_axis; static bool separate_multi_axis;
#endif #endif
@ -407,7 +407,7 @@ class Stepper {
static void microstep_readings(); static void microstep_readings();
#endif #endif
#if ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS || ENABLED(Z_STEPPER_AUTO_ALIGN) #if HAS_EXTRA_ENDSTOPS || ENABLED(Z_STEPPER_AUTO_ALIGN)
FORCE_INLINE static void set_separate_multi_axis(const bool state) { separate_multi_axis = state; } FORCE_INLINE static void set_separate_multi_axis(const bool state) { separate_multi_axis = state; }
#endif #endif
#if ENABLED(X_DUAL_ENDSTOPS) #if ENABLED(X_DUAL_ENDSTOPS)