瀏覽代碼

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.
Chris Roadfeldt 10 年之前
父節點
當前提交
17707e7479
共有 4 個文件被更改,包括 565 次插入397 次删除
  1. 1
    1
      Marlin/Conditionals.h
  2. 554
    391
      Marlin/Marlin_main.cpp
  3. 1
    1
      Marlin/SanityCheck.h
  4. 9
    4
      Marlin/stepper.cpp

+ 1
- 1
Marlin/Conditionals.h 查看文件

@@ -186,7 +186,7 @@
186 186
       #define ENDSTOPPULLUP_ZMIN
187 187
     #endif
188 188
     #ifndef DISABLE_Z_PROBE_ENDSTOP
189
-      #define ENDSTOPPULL_ZPROBE
189
+      #define ENDSTOPPULLUP_ZPROBE
190 190
     #endif
191 191
   #endif
192 192
 

+ 554
- 391
Marlin/Marlin_main.cpp
文件差異過大導致無法顯示
查看文件


+ 1
- 1
Marlin/SanityCheck.h 查看文件

@@ -116,7 +116,7 @@
116 116
         #error You must have at least 1 servo defined for NUM_SERVOS to use Z_PROBE_AND_ENDSTOP
117 117
       #endif
118 118
       #ifndef SERVO_ENDSTOPS
119
-        #error You must have SERVO_ENDSTOPS defined and have the Z index set to at least 1 to use Z_PROBE_AND_ENDSTOP
119
+        #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
120 120
       #endif
121 121
       #ifndef SERVO_ENDSTOP_ANGLES
122 122
         #error You must have SERVO_ENDSTOP_ANGLES defined for Z Extend and Retract to use Z_PROBE_AND_ENSTOP

+ 9
- 4
Marlin/stepper.cpp 查看文件

@@ -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;

Loading…
取消
儲存