Merge pull request #45 from pelrun/master
Added M119 - query status of endstops
This commit is contained in:
commit
7cee3a9c8e
1 changed files with 26 additions and 0 deletions
|
|
@ -786,6 +786,32 @@ inline void process_commands()
|
||||||
Serial.print("E:");
|
Serial.print("E:");
|
||||||
Serial.println(current_position[3]);
|
Serial.println(current_position[3]);
|
||||||
break;
|
break;
|
||||||
|
case 119: // M119
|
||||||
|
#if (X_MIN_PIN > -1)
|
||||||
|
Serial.print("x_min:");
|
||||||
|
Serial.println((digitalRead(X_MIN_PIN)^ENDSTOPS_INVERTING)?"H":"L");
|
||||||
|
#endif
|
||||||
|
#if (X_MAX_PIN > -1)
|
||||||
|
Serial.print("x_max:");
|
||||||
|
Serial.println((digitalRead(X_MAX_PIN)^ENDSTOPS_INVERTING)?"H":"L");
|
||||||
|
#endif
|
||||||
|
#if (Y_MIN_PIN > -1)
|
||||||
|
Serial.print("y_min:");
|
||||||
|
Serial.println((digitalRead(Y_MIN_PIN)^ENDSTOPS_INVERTING)?"H":"L");
|
||||||
|
#endif
|
||||||
|
#if (Y_MAX_PIN > -1)
|
||||||
|
Serial.print("y_max:");
|
||||||
|
Serial.println((digitalRead(Y_MAX_PIN)^ENDSTOPS_INVERTING)?"H":"L");
|
||||||
|
#endif
|
||||||
|
#if (Z_MIN_PIN > -1)
|
||||||
|
Serial.print("z_min:");
|
||||||
|
Serial.println((digitalRead(Z_MIN_PIN)^ENDSTOPS_INVERTING)?"H":"L");
|
||||||
|
#endif
|
||||||
|
#if (Z_MAX_PIN > -1)
|
||||||
|
Serial.print("z_max:");
|
||||||
|
Serial.println((digitalRead(Z_MAX_PIN)^ENDSTOPS_INVERTING)?"H":"L");
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
#ifdef RAMP_ACCELERATION
|
#ifdef RAMP_ACCELERATION
|
||||||
//TODO: update for all axis, use for loop
|
//TODO: update for all axis, use for loop
|
||||||
case 201: // M201
|
case 201: // M201
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue