summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Churchill <james@rfdesign.com.au>2011-07-01 05:19:18 +1000
committerJames Churchill <james@rfdesign.com.au>2011-07-01 05:19:18 +1000
commit154059b8f608db26c9febf4c73010627ccac27a7 (patch)
tree279673b99f0932e16c71458f974cbe0a3a7b10ec
parentbce2cd1b1338ae4258bd5487962afc2328538a69 (diff)
Add M119 - return status of endstops
-rw-r--r--Tonokip_Firmware/Tonokip_Firmware.pde26
1 files changed, 26 insertions, 0 deletions
diff --git a/Tonokip_Firmware/Tonokip_Firmware.pde b/Tonokip_Firmware/Tonokip_Firmware.pde
index fc49da1..318ff74 100644
--- a/Tonokip_Firmware/Tonokip_Firmware.pde
+++ b/Tonokip_Firmware/Tonokip_Firmware.pde
@@ -783,6 +783,32 @@ inline void process_commands()
Serial.print("E:");
Serial.println(current_e);
break;
+ case 119: // M119
+ #if (X_MIN_PIN > -1)
+ Serial.print("x_min:");
+ Serial.println(digitalRead(X_MIN_PIN)?"H":"L");
+ #endif
+ #if (X_MAX_PIN > -1)
+ Serial.print("x_max:");
+ Serial.println(digitalRead(X_MAX_PIN)?"H":"L");
+ #endif
+ #if (Y_MIN_PIN > -1)
+ Serial.print("y_min:");
+ Serial.println(digitalRead(Y_MIN_PIN)?"H":"L");
+ #endif
+ #if (Y_MAX_PIN > -1)
+ Serial.print("y_max:");
+ Serial.println(digitalRead(Y_MAX_PIN)?"H":"L");
+ #endif
+ #if (Z_MIN_PIN > -1)
+ Serial.print("z_min:");
+ Serial.println(digitalRead(Z_MIN_PIN)?"H":"L");
+ #endif
+ #if (Z_MAX_PIN > -1)
+ Serial.print("z_max:");
+ Serial.println(digitalRead(Z_MAX_PIN)?"H":"L");
+ #endif
+ break;
#ifdef RAMP_ACCELERATION
case 201: // M201
if(code_seen('X')) x_steps_per_sqr_second = code_value() * x_steps_per_unit;