Browse Source

Added serial message for Z Probe trigger.

Chris Roadfeldt 9 years ago
parent
commit
fd823449ad
3 changed files with 8 additions and 4 deletions
  1. 3
    3
      Marlin/Configuration.h
  2. 4
    1
      Marlin/Marlin_main.cpp
  3. 1
    0
      Marlin/language.h

+ 3
- 3
Marlin/Configuration.h View File

@@ -497,9 +497,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
497 497
   #ifdef Z_PROBE_AND_ENDSTOP
498 498
 
499 499
 // As of 3-28-2015, there are NO Z Probe pins defined in any board config files.
500
-// Z_PROBE_PIN is for the signal pin only. RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D1 pin in the Aux 1 section of the RAMPS board for the signal.
501
-// The D1 pin in Aux 1 on RAMPS maps to the Arduino D1 pin. The Z_PROBE_PIN is setting the pin to use on the Arduino. Since the D1 pin on the RAMPS maps to D1 on Arduino, this works.
502
-// If you have RAMPS 1.3/1.4 and want to use the RAMPS D1 pin, set Z_PROBE_PIN to 1 and use ground and 5v next to it as needed. Check the RAMPS 1.3/1.4 pinout diagram for details.
500
+// Z_PROBE_PIN is for the signal pin only. RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board for the signal.
501
+// The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin. The Z_PROBE_PIN is setting the pin to use on the Arduino. Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
502
+// If you have RAMPS 1.3/1.4 and want to use the RAMPS D32 pin, set Z_PROBE_PIN to 32 and use ground and 5v next to it as needed. Check the RAMPS 1.3/1.4 pinout diagram for details.
503 503
 // WARNING: Setting the wrong pin may have unexpected and disastrous outcomes. Use with caution and do your homework.
504 504
   #define Z_PROBE_PIN -1
505 505
 

+ 4
- 1
Marlin/Marlin_main.cpp View File

@@ -3509,7 +3509,10 @@ inline void gcode_M119() {
3509 3509
     SERIAL_PROTOCOLPGM(MSG_Z2_MAX);
3510 3510
     SERIAL_PROTOCOLLN(((READ(Z2_MAX_PIN)^Z2_MAX_ENDSTOP_INVERTING)?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN));
3511 3511
   #endif
3512
-  
3512
+  #if defined(Z_PROBE_PIN) && Z_PROBE_PIN >-1
3513
+    SERIAL_PROTOCOLPGM(MSG_Z_PROBE);
3514
+    SERIALPROTOCOLLN(((READ(Z_PROBE_PIN)^72Z_PROBE_ENDSTOP_INVERTING)?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN));
3515
+  #endif
3513 3516
 }
3514 3517
 
3515 3518
 /**

+ 1
- 0
Marlin/language.h View File

@@ -132,6 +132,7 @@
132 132
 #define MSG_Z_MIN                           "z_min: "
133 133
 #define MSG_Z_MAX                           "z_max: "
134 134
 #define MSG_Z2_MAX                          "z2_max: "
135
+#define MSG_Z_PROBE							"z_probe: "
135 136
 #define MSG_M119_REPORT                     "Reporting endstop status"
136 137
 #define MSG_ENDSTOP_HIT                     "TRIGGERED"
137 138
 #define MSG_ENDSTOP_OPEN                    "open"

Loading…
Cancel
Save