Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #254 from ZetaPhoenix/Marlin_v1_bugfix

Changes to M119 response for easier visual comparison
  • Loading branch information...
commit c0aad4c28a5495bdb117d9743efbc27274548a29 2 parents 0a31ccb + 8ac5b29
@ErikZalm authored
Showing with 35 additions and 27 deletions.
  1. +7 −7 Marlin/Marlin.pde
  2. +28 −20 Marlin/language.h
View
14 Marlin/Marlin.pde
@@ -1225,31 +1225,31 @@ void process_commands()
enable_endstops(true) ;
break;
case 119: // M119
+ SERIAL_PROTOCOLLN(MSG_M119_REPORT);
#if (X_MIN_PIN > -1)
SERIAL_PROTOCOLPGM(MSG_X_MIN);
- SERIAL_PROTOCOL(((READ(X_MIN_PIN)^X_ENDSTOPS_INVERTING)?"H ":"L "));
+ SERIAL_PROTOCOLLN(((READ(X_MIN_PIN)^X_ENDSTOPS_INVERTING)?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN));
#endif
#if (X_MAX_PIN > -1)
SERIAL_PROTOCOLPGM(MSG_X_MAX);
- SERIAL_PROTOCOL(((READ(X_MAX_PIN)^X_ENDSTOPS_INVERTING)?"H ":"L "));
+ SERIAL_PROTOCOLLN(((READ(X_MAX_PIN)^X_ENDSTOPS_INVERTING)?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN));
#endif
#if (Y_MIN_PIN > -1)
SERIAL_PROTOCOLPGM(MSG_Y_MIN);
- SERIAL_PROTOCOL(((READ(Y_MIN_PIN)^Y_ENDSTOPS_INVERTING)?"H ":"L "));
+ SERIAL_PROTOCOLLN(((READ(Y_MIN_PIN)^Y_ENDSTOPS_INVERTING)?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN));
#endif
#if (Y_MAX_PIN > -1)
SERIAL_PROTOCOLPGM(MSG_Y_MAX);
- SERIAL_PROTOCOL(((READ(Y_MAX_PIN)^Y_ENDSTOPS_INVERTING)?"H ":"L "));
+ SERIAL_PROTOCOLLN(((READ(Y_MAX_PIN)^Y_ENDSTOPS_INVERTING)?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN));
#endif
#if (Z_MIN_PIN > -1)
SERIAL_PROTOCOLPGM(MSG_Z_MIN);
- SERIAL_PROTOCOL(((READ(Z_MIN_PIN)^Z_ENDSTOPS_INVERTING)?"H ":"L "));
+ SERIAL_PROTOCOLLN(((READ(Z_MIN_PIN)^Z_ENDSTOPS_INVERTING)?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN));
#endif
#if (Z_MAX_PIN > -1)
SERIAL_PROTOCOLPGM(MSG_Z_MAX);
- SERIAL_PROTOCOL(((READ(Z_MAX_PIN)^Z_ENDSTOPS_INVERTING)?"H ":"L "));
+ SERIAL_PROTOCOLLN(((READ(Z_MAX_PIN)^Z_ENDSTOPS_INVERTING)?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN));
#endif
- SERIAL_PROTOCOLLN("");
break;
//TODO: update for all axis, use for loop
case 201: // M201
View
48 Marlin/language.h
@@ -151,17 +151,20 @@
#define MSG_M115_REPORT "FIRMWARE_NAME:Marlin V1; Sprinter/grbl mashup for gen6 FIRMWARE_URL:" FIRMWARE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) "\n"
#define MSG_COUNT_X " Count X:"
#define MSG_ERR_KILLED "Printer halted. kill() called !!"
- #define MSG_ERR_STOPPED "Printer stopped deu to errors. Fix the error and use M999 to restart!. (Temperature is reset. Set it before restarting)"
+ #define MSG_ERR_STOPPED "Printer stopped due to errors. Fix the error and use M999 to restart!. (Temperature is reset. Set it before restarting)"
#define MSG_RESEND "Resend:"
#define MSG_UNKNOWN_COMMAND "Unknown command:\""
#define MSG_ACTIVE_EXTRUDER "Active Extruder: "
#define MSG_INVALID_EXTRUDER "Invalid extruder"
- #define MSG_X_MIN "x_min:"
- #define MSG_X_MAX "x_max:"
- #define MSG_Y_MIN "y_min:"
- #define MSG_Y_MAX "y_max:"
- #define MSG_Z_MIN "z_min:"
- #define MSG_Z_MAX "z_max:"
+ #define MSG_X_MIN "x_min: "
+ #define MSG_X_MAX "x_max: "
+ #define MSG_Y_MIN "y_min: "
+ #define MSG_Y_MAX "y_max: "
+ #define MSG_Z_MIN "z_min: "
+ #define MSG_Z_MAX "z_max: "
+ #define MSG_M119_REPORT "Reporting endstop status"
+ #define MSG_ENDSTOP_HIT "TRIGGERED"
+ #define MSG_ENDSTOP_OPEN "open"
#define MSG_SD_CANT_OPEN_SUBDIR "Cannot open subdir"
#define MSG_SD_INIT_FAIL "SD init fail"
@@ -311,12 +314,15 @@
#define MSG_UNKNOWN_COMMAND "Unknown command:\""
#define MSG_ACTIVE_EXTRUDER "Active Extruder: "
#define MSG_INVALID_EXTRUDER "Invalid extruder"
- #define MSG_X_MIN "x_min:"
- #define MSG_X_MAX "x_max:"
- #define MSG_Y_MIN "y_min:"
- #define MSG_Y_MAX "y_max:"
- #define MSG_Z_MIN "z_min:"
- #define MSG_Z_MAX "z_max:"
+ #define MSG_X_MIN "x_min: "
+ #define MSG_X_MAX "x_max: "
+ #define MSG_Y_MIN "y_min: "
+ #define MSG_Y_MAX "y_max: "
+ #define MSG_Z_MIN "z_min: "
+ #define MSG_Z_MAX "z_max: "
+ #define MSG_M119_REPORT "Reporting endstop status"
+ #define MSG_ENDSTOP_HIT "TRIGGERED"
+ #define MSG_ENDSTOP_OPEN "open"
#define MSG_SD_CANT_OPEN_SUBDIR "Cannot open subdir"
#define MSG_SD_INIT_FAIL "SD init fail"
@@ -466,13 +472,15 @@
#define MSG_UNKNOWN_COMMAND "Comando Desconocido:\""
#define MSG_ACTIVE_EXTRUDER "Extrusor Activo: "
#define MSG_INVALID_EXTRUDER "Extrusor Invalido"
-#define MSG_X_MIN "x_min:"
-#define MSG_X_MAX "x_max:"
-#define MSG_Y_MIN "y_min:"
-#define MSG_Y_MAX "y_max:"
-#define MSG_Z_MIN "z_min:"
-#define MSG_Z_MAX "z_max:"
-
+#define MSG_X_MIN "x_min: "
+#define MSG_X_MAX "x_max: "
+#define MSG_Y_MIN "y_min: "
+#define MSG_Y_MAX "y_max: "
+#define MSG_Z_MIN "z_min: "
+#define MSG_M119_REPORT "Reporting endstop status"
+#define MSG_ENDSTOP_HIT "TRIGGERED"
+#define MSG_ENDSTOP_OPEN "open"
+
#define MSG_SD_CANT_OPEN_SUBDIR "No se pudo abrir la subcarpeta."
#define MSG_SD_INIT_FAIL "Fallo al iniciar la SD"
#define MSG_SD_VOL_INIT_FAIL "Fallo al montar el volumen"
Please sign in to comment.
Something went wrong with that request. Please try again.