|
@@ -76,6 +76,7 @@ volatile long endstops_stepsTotal, endstops_stepsDone;
|
76
|
76
|
static volatile bool endstop_x_hit = false;
|
77
|
77
|
static volatile bool endstop_y_hit = false;
|
78
|
78
|
static volatile bool endstop_z_hit = false;
|
|
79
|
+static volatile bool endstop_z_probe_hit = false;
|
79
|
80
|
|
80
|
81
|
#ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
|
81
|
82
|
bool abort_on_endstop_hit = false;
|
|
@@ -258,11 +259,11 @@ volatile signed char count_direction[NUM_AXIS] = { 1, 1, 1, 1 };
|
258
|
259
|
#define DISABLE_STEPPER_DRIVER_INTERRUPT() TIMSK1 &= ~BIT(OCIE1A)
|
259
|
260
|
|
260
|
261
|
void endstops_hit_on_purpose() {
|
261
|
|
- endstop_x_hit = endstop_y_hit = endstop_z_hit = false;
|
|
262
|
+ endstop_x_hit = endstop_y_hit = endstop_z_hit = endstop_z_probe_hit = false;
|
262
|
263
|
}
|
263
|
264
|
|
264
|
265
|
void checkHitEndstops() {
|
265
|
|
- if (endstop_x_hit || endstop_y_hit || endstop_z_hit) {
|
|
266
|
+ if (endstop_x_hit || endstop_y_hit || endstop_z_hit || endstop_z_probe_hit) {
|
266
|
267
|
SERIAL_ECHO_START;
|
267
|
268
|
SERIAL_ECHOPGM(MSG_ENDSTOPS_HIT);
|
268
|
269
|
if (endstop_x_hit) {
|
|
@@ -277,6 +278,10 @@ void checkHitEndstops() {
|
277
|
278
|
SERIAL_ECHOPAIR(" Z:", (float)endstops_trigsteps[Z_AXIS] / axis_steps_per_unit[Z_AXIS]);
|
278
|
279
|
LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "Z");
|
279
|
280
|
}
|
|
281
|
+ if (endstop_z_probe_hit) {
|
|
282
|
+ SERIAL_ECHOPAIR(" Z_PROBE:", (float)endstops_trigsteps[Z_AXIS] / axis_steps_per_unit[Z_AXIS]);
|
|
283
|
+ LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "ZP");
|
|
284
|
+ }
|
280
|
285
|
SERIAL_EOL;
|
281
|
286
|
|
282
|
287
|
endstops_hit_on_purpose();
|
|
@@ -549,7 +554,7 @@ ISR(TIMER1_COMPA_vect) {
|
549
|
554
|
if(z_probe_endstop && old_z_probe_endstop)
|
550
|
555
|
{
|
551
|
556
|
endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS];
|
552
|
|
- endstop_z_hit=true;
|
|
557
|
+ endstop_z_probe_hit=true;
|
553
|
558
|
|
554
|
559
|
// if (z_probe_endstop && old_z_probe_endstop) SERIAL_ECHOLN("z_probe_endstop = true");
|
555
|
560
|
}
|
|
@@ -596,7 +601,7 @@ ISR(TIMER1_COMPA_vect) {
|
596
|
601
|
if(z_probe_endstop && old_z_probe_endstop)
|
597
|
602
|
{
|
598
|
603
|
endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS];
|
599
|
|
- endstop_z_hit=true;
|
|
604
|
+ endstop_z_probe_hit=true;
|
600
|
605
|
// if (z_probe_endstop && old_z_probe_endstop) SERIAL_ECHOLN("z_probe_endstop = true");
|
601
|
606
|
}
|
602
|
607
|
old_z_probe_endstop = z_probe_endstop;
|