Fixed Z_PROBE_PIN pullup bug.
Documented some additional areas that should be addressed if Z_PROBE is fully separated from Z_MIN or Z_MAX. Fixed a documentation error in sanity checks. Servos start at 0 not 1.
This commit is contained in:
parent
ec1d9c0b8f
commit
17707e7479
@ -186,7 +186,7 @@
|
|||||||
#define ENDSTOPPULLUP_ZMIN
|
#define ENDSTOPPULLUP_ZMIN
|
||||||
#endif
|
#endif
|
||||||
#ifndef DISABLE_Z_PROBE_ENDSTOP
|
#ifndef DISABLE_Z_PROBE_ENDSTOP
|
||||||
#define ENDSTOPPULL_ZPROBE
|
#define ENDSTOPPULLUP_ZPROBE
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -116,7 +116,7 @@
|
|||||||
#error You must have at least 1 servo defined for NUM_SERVOS to use Z_PROBE_AND_ENDSTOP
|
#error You must have at least 1 servo defined for NUM_SERVOS to use Z_PROBE_AND_ENDSTOP
|
||||||
#endif
|
#endif
|
||||||
#ifndef SERVO_ENDSTOPS
|
#ifndef SERVO_ENDSTOPS
|
||||||
#error You must have SERVO_ENDSTOPS defined and have the Z index set to at least 1 to use Z_PROBE_AND_ENDSTOP
|
#error You must have SERVO_ENDSTOPS defined and have the Z index set to at least 0 or above to use Z_PROBE_AND_ENDSTOP
|
||||||
#endif
|
#endif
|
||||||
#ifndef SERVO_ENDSTOP_ANGLES
|
#ifndef SERVO_ENDSTOP_ANGLES
|
||||||
#error You must have SERVO_ENDSTOP_ANGLES defined for Z Extend and Retract to use Z_PROBE_AND_ENSTOP
|
#error You must have SERVO_ENDSTOP_ANGLES defined for Z Extend and Retract to use Z_PROBE_AND_ENSTOP
|
||||||
|
@ -76,6 +76,7 @@ volatile long endstops_stepsTotal, endstops_stepsDone;
|
|||||||
static volatile bool endstop_x_hit = false;
|
static volatile bool endstop_x_hit = false;
|
||||||
static volatile bool endstop_y_hit = false;
|
static volatile bool endstop_y_hit = false;
|
||||||
static volatile bool endstop_z_hit = false;
|
static volatile bool endstop_z_hit = false;
|
||||||
|
static volatile bool endstop_z_probe_hit = false;
|
||||||
|
|
||||||
#ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
|
#ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
|
||||||
bool abort_on_endstop_hit = false;
|
bool abort_on_endstop_hit = false;
|
||||||
@ -258,11 +259,11 @@ volatile signed char count_direction[NUM_AXIS] = { 1, 1, 1, 1 };
|
|||||||
#define DISABLE_STEPPER_DRIVER_INTERRUPT() TIMSK1 &= ~BIT(OCIE1A)
|
#define DISABLE_STEPPER_DRIVER_INTERRUPT() TIMSK1 &= ~BIT(OCIE1A)
|
||||||
|
|
||||||
void endstops_hit_on_purpose() {
|
void endstops_hit_on_purpose() {
|
||||||
endstop_x_hit = endstop_y_hit = endstop_z_hit = false;
|
endstop_x_hit = endstop_y_hit = endstop_z_hit = endstop_z_probe_hit = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void checkHitEndstops() {
|
void checkHitEndstops() {
|
||||||
if (endstop_x_hit || endstop_y_hit || endstop_z_hit) {
|
if (endstop_x_hit || endstop_y_hit || endstop_z_hit || endstop_z_probe_hit) {
|
||||||
SERIAL_ECHO_START;
|
SERIAL_ECHO_START;
|
||||||
SERIAL_ECHOPGM(MSG_ENDSTOPS_HIT);
|
SERIAL_ECHOPGM(MSG_ENDSTOPS_HIT);
|
||||||
if (endstop_x_hit) {
|
if (endstop_x_hit) {
|
||||||
@ -277,6 +278,10 @@ void checkHitEndstops() {
|
|||||||
SERIAL_ECHOPAIR(" Z:", (float)endstops_trigsteps[Z_AXIS] / axis_steps_per_unit[Z_AXIS]);
|
SERIAL_ECHOPAIR(" Z:", (float)endstops_trigsteps[Z_AXIS] / axis_steps_per_unit[Z_AXIS]);
|
||||||
LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "Z");
|
LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "Z");
|
||||||
}
|
}
|
||||||
|
if (endstop_z_probe_hit) {
|
||||||
|
SERIAL_ECHOPAIR(" Z_PROBE:", (float)endstops_trigsteps[Z_AXIS] / axis_steps_per_unit[Z_AXIS]);
|
||||||
|
LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "ZP");
|
||||||
|
}
|
||||||
SERIAL_EOL;
|
SERIAL_EOL;
|
||||||
|
|
||||||
endstops_hit_on_purpose();
|
endstops_hit_on_purpose();
|
||||||
@ -549,7 +554,7 @@ ISR(TIMER1_COMPA_vect) {
|
|||||||
if(z_probe_endstop && old_z_probe_endstop)
|
if(z_probe_endstop && old_z_probe_endstop)
|
||||||
{
|
{
|
||||||
endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS];
|
endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS];
|
||||||
endstop_z_hit=true;
|
endstop_z_probe_hit=true;
|
||||||
|
|
||||||
// if (z_probe_endstop && old_z_probe_endstop) SERIAL_ECHOLN("z_probe_endstop = true");
|
// if (z_probe_endstop && old_z_probe_endstop) SERIAL_ECHOLN("z_probe_endstop = true");
|
||||||
}
|
}
|
||||||
@ -596,7 +601,7 @@ ISR(TIMER1_COMPA_vect) {
|
|||||||
if(z_probe_endstop && old_z_probe_endstop)
|
if(z_probe_endstop && old_z_probe_endstop)
|
||||||
{
|
{
|
||||||
endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS];
|
endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS];
|
||||||
endstop_z_hit=true;
|
endstop_z_probe_hit=true;
|
||||||
// if (z_probe_endstop && old_z_probe_endstop) SERIAL_ECHOLN("z_probe_endstop = true");
|
// if (z_probe_endstop && old_z_probe_endstop) SERIAL_ECHOLN("z_probe_endstop = true");
|
||||||
}
|
}
|
||||||
old_z_probe_endstop = z_probe_endstop;
|
old_z_probe_endstop = z_probe_endstop;
|
||||||
|
Loading…
Reference in New Issue
Block a user