Some renaming of Z_PROBE to Z_MIN_PROBE (PR#91)

* Fix a couple of renames omission and macro expansion errors.
master
Christian Lefrançois 9 years ago committed by Richard Wackerbarth
parent 4939c642b4
commit a7822e3ff7

@ -239,7 +239,7 @@
#define ENDSTOPPULLUP_ZMIN
#endif
#if DISABLED(DISABLE_Z_MIN_PROBE_ENDSTOP)
#define ENDSTOPPULLUP_ZPROBE
#define ENDSTOPPULLUP_ZMIN_PROBE
#endif
#endif
@ -447,7 +447,7 @@
#define HAS_Z_MAX (PIN_EXISTS(Z_MAX))
#define HAS_Z2_MIN (PIN_EXISTS(Z2_MIN))
#define HAS_Z2_MAX (PIN_EXISTS(Z2_MAX))
#define HAS_Z_PROBE (PIN_EXISTS(Z_PROBE))
#define HAS_Z_PROBE (PIN_EXISTS(Z_MIN_PROBE))
#define HAS_SOLENOID_1 (PIN_EXISTS(SOL1))
#define HAS_SOLENOID_2 (PIN_EXISTS(SOL2))
#define HAS_SOLENOID_3 (PIN_EXISTS(SOL3))

@ -196,7 +196,7 @@ void manage_inactivity(bool ignore_stepper_queue=false);
*/
enum AxisEnum {X_AXIS=0, A_AXIS=0, Y_AXIS=1, B_AXIS=1, Z_AXIS=2, C_AXIS=2, E_AXIS=3, X_HEAD=4, Y_HEAD=5, Z_HEAD=5};
enum EndstopEnum {X_MIN=0, Y_MIN=1, Z_MIN=2, Z_PROBE=3, X_MAX=4, Y_MAX=5, Z_MAX=6, Z2_MIN=7, Z2_MAX=8};
enum EndstopEnum {X_MIN=0, Y_MIN=1, Z_MIN=2, Z_MIN_PROBE=3, X_MAX=4, Y_MAX=5, Z_MAX=6, Z2_MIN=7, Z2_MAX=8};
void enable_all_steppers();
void disable_all_steppers();

@ -132,8 +132,8 @@
/**
* Require a Z Min pin
*/
#if Z_MIN_PIN == -1
#if Z_MIN_PROBE_PIN == -1 || (DISABLED(Z_MIN_PROBE_ENDSTOP) || ENABLED(DISABLE_Z_MIN_PROBE_ENDSTOP)) // It's possible for someone to set a pin for the Z Probe, but not enable it.
#if !PIN_EXISTS(Z_MIN)
#if !PIN_EXISTS(Z_MIN_PROBE) || (DISABLED(Z_MIN_PROBE_ENDSTOP) || ENABLED(DISABLE_Z_MIN_PROBE_ENDSTOP)) // It's possible for someone to set a pin for the Z Probe, but not enable it.
#if ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)
#error You must have a Z_MIN or Z_PROBE endstop to enable Z_MIN_PROBE_REPEATABILITY_TEST.
#else
@ -146,10 +146,10 @@
* Require a Z Probe Pin if Z_MIN_PROBE_ENDSTOP is enabled.
*/
#if ENABLED(Z_MIN_PROBE_ENDSTOP)
#if !PIN_EXISTS(Z_PROBE)
#ifndef Z_MIN_PROBE_PIN
#error You must have a Z_MIN_PROBE_PIN defined in your pins_XXXX.h file if you enable Z_MIN_PROBE_ENDSTOP.
#endif
#if Z_MIN_PROBE_PIN == -1
#if !PIN_EXISTS(Z_MIN_PROBE)
#error You must set Z_MIN_PROBE_PIN to a valid pin if you enable Z_MIN_PROBE_ENDSTOP.
#endif
// Forcing Servo definitions can break some hall effect sensor setups. Leaving these here for further comment.

@ -327,7 +327,7 @@ Here are some standard links for getting your machine calibrated:
// #define ENDSTOPPULLUP_XMIN
// #define ENDSTOPPULLUP_YMIN
// #define ENDSTOPPULLUP_ZMIN
// #define ENDSTOPPULLUP_ZPROBE
// #define ENDSTOPPULLUP_ZMIN_PROBE
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).

@ -309,7 +309,7 @@ Here are some standard links for getting your machine calibrated:
// #define ENDSTOPPULLUP_XMIN
// #define ENDSTOPPULLUP_YMIN
// #define ENDSTOPPULLUP_ZMIN
// #define ENDSTOPPULLUP_ZPROBE
// #define ENDSTOPPULLUP_ZMIN_PROBE
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).

@ -294,6 +294,7 @@ Here are some standard links for getting your machine calibrated:
// #define ENDSTOPPULLUP_XMIN
// #define ENDSTOPPULLUP_YMIN
// #define ENDSTOPPULLUP_ZMIN
// #define ENDSTOPPULLUP_ZMIN_PROBE
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).

@ -319,7 +319,7 @@ Here are some standard links for getting your machine calibrated:
// #define ENDSTOPPULLUP_XMIN
// #define ENDSTOPPULLUP_YMIN
// #define ENDSTOPPULLUP_ZMIN
// #define ENDSTOPPULLUP_ZPROBE
// #define ENDSTOPPULLUP_ZMIN_PROBE
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).

@ -315,7 +315,7 @@ Here are some standard links for getting your machine calibrated:
#define ENDSTOPPULLUP_XMIN
#define ENDSTOPPULLUP_YMIN
#define ENDSTOPPULLUP_ZMIN
// #define ENDSTOPPULLUP_ZPROBE
// #define ENDSTOPPULLUP_ZMIN_PROBE
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).

@ -327,7 +327,7 @@ Here are some standard links for getting your machine calibrated:
// #define ENDSTOPPULLUP_XMIN
// #define ENDSTOPPULLUP_YMIN
// #define ENDSTOPPULLUP_ZMIN
// #define ENDSTOPPULLUP_ZPROBE
// #define ENDSTOPPULLUP_ZMIN_PROBE
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).

@ -313,7 +313,7 @@ Here are some standard links for getting your machine calibrated:
// #define ENDSTOPPULLUP_XMIN
// #define ENDSTOPPULLUP_YMIN
// #define ENDSTOPPULLUP_ZMIN
// #define ENDSTOPPULLUP_ZPROBE
// #define ENDSTOPPULLUP_ZMIN_PROBE
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).

@ -335,7 +335,7 @@ Here are some standard links for getting your machine calibrated:
#define ENDSTOPPULLUP_XMIN // open pin, inverted
#define ENDSTOPPULLUP_YMIN // open pin, inverted
// #define ENDSTOPPULLUP_ZMIN
// #define ENDSTOPPULLUP_ZPROBE
// #define ENDSTOPPULLUP_ZMIN_PROBE
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).

@ -319,7 +319,7 @@ Here are some standard links for getting your machine calibrated:
// #define ENDSTOPPULLUP_XMIN
// #define ENDSTOPPULLUP_YMIN
// #define ENDSTOPPULLUP_ZMIN
// #define ENDSTOPPULLUP_ZPROBE
// #define ENDSTOPPULLUP_ZMIN_PROBE
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).

@ -327,7 +327,7 @@ Here are some standard links for getting your machine calibrated:
// #define ENDSTOPPULLUP_XMIN
// #define ENDSTOPPULLUP_YMIN
// #define ENDSTOPPULLUP_ZMIN
// #define ENDSTOPPULLUP_ZPROBE
// #define ENDSTOPPULLUP_ZMIN_PROBE
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).

@ -362,7 +362,7 @@ Here are some standard links for getting your machine calibrated:
// #define ENDSTOPPULLUP_XMIN
// #define ENDSTOPPULLUP_YMIN
// #define ENDSTOPPULLUP_ZMIN
// #define ENDSTOPPULLUP_ZPROBE
// #define ENDSTOPPULLUP_ZMIN_PROBE
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).

@ -362,7 +362,7 @@ Here are some standard links for getting your machine calibrated:
// #define ENDSTOPPULLUP_XMIN
// #define ENDSTOPPULLUP_YMIN
// #define ENDSTOPPULLUP_ZMIN
// #define ENDSTOPPULLUP_ZPROBE
// #define ENDSTOPPULLUP_ZMIN_PROBE
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).

@ -362,7 +362,7 @@ Here are some standard links for getting your machine calibrated:
// #define ENDSTOPPULLUP_XMIN
// #define ENDSTOPPULLUP_YMIN
// #define ENDSTOPPULLUP_ZMIN
// #define ENDSTOPPULLUP_ZPROBE
// #define ENDSTOPPULLUP_ZMIN_PROBE
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).

@ -349,7 +349,7 @@ Here are some standard links for getting your machine calibrated:
// #define ENDSTOPPULLUP_XMIN
// #define ENDSTOPPULLUP_YMIN
// #define ENDSTOPPULLUP_ZMIN
// #define ENDSTOPPULLUP_ZPROBE
// #define ENDSTOPPULLUP_ZMIN_PROBE
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).

@ -330,7 +330,7 @@ Here are some standard links for getting your machine calibrated:
// #define ENDSTOPPULLUP_XMIN
// #define ENDSTOPPULLUP_YMIN
// #define ENDSTOPPULLUP_ZMIN
// #define ENDSTOPPULLUP_ZPROBE
// #define ENDSTOPPULLUP_ZMIN_PROBE
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).

@ -317,7 +317,7 @@ Here are some standard links for getting your machine calibrated:
// #define ENDSTOPPULLUP_XMIN
// #define ENDSTOPPULLUP_YMIN
// #define ENDSTOPPULLUP_ZMIN
// #define ENDSTOPPULLUP_ZPROBE
// #define ENDSTOPPULLUP_ZMIN_PROBE
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).

@ -37,6 +37,7 @@
#if ENABLED(Z_MIN_PROBE_ENDSTOP)
//#undef Z_MIN_PIN
//#define Z_MIN_PIN 15
// Define a pin to use as the signal pin on Arduino for the Z probe endstop.
#define Z_MIN_PROBE_PIN 19
#endif
//

@ -27,6 +27,12 @@
#define Z_ENABLE_PIN 62
#define Z_MIN_PIN 33
#define Z_MAX_PIN 32
#define Z_MIN_PROBE_PIN -1
#if ENABLED(Z_MIN_PROBE_ENDSTOP)
// Define a pin to use as the signal pin on Arduino for the Z probe endstop.
#define Z_MIN_PROBE_PIN 33
#endif
#define E0_STEP_PIN 23
#define E0_DIR_PIN 22

@ -74,14 +74,14 @@ static unsigned short step_loops_nominal;
volatile long endstops_trigsteps[3] = { 0 };
volatile long endstops_stepsTotal, endstops_stepsDone;
static volatile char endstop_hit_bits = 0; // use X_MIN, Y_MIN, Z_MIN and Z_PROBE as BIT value
static volatile char endstop_hit_bits = 0; // use X_MIN, Y_MIN, Z_MIN and Z_MIN_PROBE as BIT value
#if DISABLED(Z_DUAL_ENDSTOPS)
static byte
#else
static uint16_t
#endif
old_endstop_bits = 0; // use X_MIN, X_MAX... Z_MAX, Z_PROBE, Z2_MIN, Z2_MAX
old_endstop_bits = 0; // use X_MIN, X_MAX... Z_MAX, Z_MIN_PROBE, Z2_MIN, Z2_MAX
#if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
bool abort_on_endstop_hit = false;
@ -264,8 +264,8 @@ void checkHitEndstops() {
LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "Z");
}
#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]);
if (endstop_hit_bits & BIT(Z_MIN_PROBE)) {
SERIAL_ECHOPAIR(" Z_MIN_PROBE:", (float)endstops_trigsteps[Z_AXIS] / axis_steps_per_unit[Z_AXIS]);
LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "ZP");
}
#endif
@ -412,12 +412,12 @@ inline void update_endstops() {
#endif // Z_MIN_PIN
#if ENABLED(Z_MIN_PROBE_ENDSTOP)
UPDATE_ENDSTOP(Z, PROBE);
UPDATE_ENDSTOP(Z, MIN_PROBE);
if (TEST_ENDSTOP(Z_PROBE))
if (TEST_ENDSTOP(Z_MIN_PROBE))
{
endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS];
endstop_hit_bits |= BIT(Z_PROBE);
endstop_hit_bits |= BIT(Z_MIN_PROBE);
}
#endif
}
@ -973,7 +973,7 @@ void st_init() {
#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)
#if ENABLED(ENDSTOPPULLUP_ZMIN_PROBE)
WRITE(Z_MIN_PROBE_PIN,HIGH);
#endif
#endif

Loading…
Cancel
Save