ソースを参照

Changes to M119 response for easier visual comparison

Changed to report on individual lines with "TRIGGERED" or "open" instead of "H" or "L" on one line as H&L could be confused with logic levels High and Low which may be wrong if using inverted logic.  Added strings to language.h.

Fixed typo "deu" in English language that was fixed in #134 but got added back in via 9f7f7354f5
ZetaPhoenix 11年前
コミット
8ac5b29e02
2個のファイルの変更35行の追加27行の削除
  1. 7
    7
      Marlin/Marlin.pde
  2. 28
    20
      Marlin/language.h

+ 7
- 7
Marlin/Marlin.pde ファイルの表示

@@ -1225,31 +1225,31 @@ void process_commands()
1225 1225
       enable_endstops(true) ;
1226 1226
       break;
1227 1227
     case 119: // M119
1228
+    SERIAL_PROTOCOLLN(MSG_M119_REPORT);
1228 1229
       #if (X_MIN_PIN > -1)
1229 1230
         SERIAL_PROTOCOLPGM(MSG_X_MIN);
1230
-        SERIAL_PROTOCOL(((READ(X_MIN_PIN)^X_ENDSTOPS_INVERTING)?"H ":"L "));
1231
+        SERIAL_PROTOCOLLN(((READ(X_MIN_PIN)^X_ENDSTOPS_INVERTING)?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN));
1231 1232
       #endif
1232 1233
       #if (X_MAX_PIN > -1)
1233 1234
         SERIAL_PROTOCOLPGM(MSG_X_MAX);
1234
-        SERIAL_PROTOCOL(((READ(X_MAX_PIN)^X_ENDSTOPS_INVERTING)?"H ":"L "));
1235
+        SERIAL_PROTOCOLLN(((READ(X_MAX_PIN)^X_ENDSTOPS_INVERTING)?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN));
1235 1236
       #endif
1236 1237
       #if (Y_MIN_PIN > -1)
1237 1238
         SERIAL_PROTOCOLPGM(MSG_Y_MIN);
1238
-        SERIAL_PROTOCOL(((READ(Y_MIN_PIN)^Y_ENDSTOPS_INVERTING)?"H ":"L "));
1239
+        SERIAL_PROTOCOLLN(((READ(Y_MIN_PIN)^Y_ENDSTOPS_INVERTING)?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN));
1239 1240
       #endif
1240 1241
       #if (Y_MAX_PIN > -1)
1241 1242
         SERIAL_PROTOCOLPGM(MSG_Y_MAX);
1242
-        SERIAL_PROTOCOL(((READ(Y_MAX_PIN)^Y_ENDSTOPS_INVERTING)?"H ":"L "));
1243
+        SERIAL_PROTOCOLLN(((READ(Y_MAX_PIN)^Y_ENDSTOPS_INVERTING)?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN));
1243 1244
       #endif
1244 1245
       #if (Z_MIN_PIN > -1)
1245 1246
         SERIAL_PROTOCOLPGM(MSG_Z_MIN);
1246
-        SERIAL_PROTOCOL(((READ(Z_MIN_PIN)^Z_ENDSTOPS_INVERTING)?"H ":"L "));
1247
+        SERIAL_PROTOCOLLN(((READ(Z_MIN_PIN)^Z_ENDSTOPS_INVERTING)?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN));
1247 1248
       #endif
1248 1249
       #if (Z_MAX_PIN > -1)
1249 1250
         SERIAL_PROTOCOLPGM(MSG_Z_MAX);
1250
-        SERIAL_PROTOCOL(((READ(Z_MAX_PIN)^Z_ENDSTOPS_INVERTING)?"H ":"L "));
1251
+        SERIAL_PROTOCOLLN(((READ(Z_MAX_PIN)^Z_ENDSTOPS_INVERTING)?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN));
1251 1252
       #endif
1252
-      SERIAL_PROTOCOLLN("");
1253 1253
       break;
1254 1254
       //TODO: update for all axis, use for loop
1255 1255
     case 201: // M201

+ 28
- 20
Marlin/language.h ファイルの表示

@@ -151,17 +151,20 @@
151 151
 	#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"
152 152
 	#define MSG_COUNT_X " Count X:"
153 153
 	#define MSG_ERR_KILLED "Printer halted. kill() called !!"
154
-	#define MSG_ERR_STOPPED "Printer stopped deu to errors. Fix the error and use M999 to restart!. (Temperature is reset. Set it before restarting)"
154
+	#define MSG_ERR_STOPPED "Printer stopped due to errors. Fix the error and use M999 to restart!. (Temperature is reset. Set it before restarting)"
155 155
 	#define MSG_RESEND "Resend:"
156 156
 	#define MSG_UNKNOWN_COMMAND "Unknown command:\""
157 157
 	#define MSG_ACTIVE_EXTRUDER "Active Extruder: "
158 158
 	#define MSG_INVALID_EXTRUDER "Invalid extruder"
159
-	#define MSG_X_MIN "x_min:"
160
-	#define MSG_X_MAX "x_max:"
161
-	#define MSG_Y_MIN "y_min:"
162
-	#define MSG_Y_MAX "y_max:"
163
-	#define MSG_Z_MIN "z_min:"
164
-	#define MSG_Z_MAX "z_max:"
159
+	#define MSG_X_MIN "x_min: "
160
+	#define MSG_X_MAX "x_max: "
161
+	#define MSG_Y_MIN "y_min: "
162
+	#define MSG_Y_MAX "y_max: "
163
+	#define MSG_Z_MIN "z_min: "
164
+	#define MSG_Z_MAX "z_max: "
165
+	#define MSG_M119_REPORT "Reporting endstop status"
166
+	#define MSG_ENDSTOP_HIT "TRIGGERED"
167
+	#define MSG_ENDSTOP_OPEN "open"
165 168
 
166 169
 	#define MSG_SD_CANT_OPEN_SUBDIR "Cannot open subdir"
167 170
 	#define MSG_SD_INIT_FAIL "SD init fail"
@@ -311,12 +314,15 @@
311 314
 	#define MSG_UNKNOWN_COMMAND "Unknown command:\""
312 315
 	#define MSG_ACTIVE_EXTRUDER "Active Extruder: "
313 316
 	#define MSG_INVALID_EXTRUDER "Invalid extruder"
314
-	#define MSG_X_MIN "x_min:"
315
-	#define MSG_X_MAX "x_max:"
316
-	#define MSG_Y_MIN "y_min:"
317
-	#define MSG_Y_MAX "y_max:"
318
-	#define MSG_Z_MIN "z_min:"
319
-	#define MSG_Z_MAX "z_max:"
317
+	#define MSG_X_MIN "x_min: "
318
+	#define MSG_X_MAX "x_max: "
319
+	#define MSG_Y_MIN "y_min: "
320
+	#define MSG_Y_MAX "y_max: "
321
+	#define MSG_Z_MIN "z_min: "
322
+	#define MSG_Z_MAX "z_max: "
323
+	#define MSG_M119_REPORT "Reporting endstop status"
324
+	#define MSG_ENDSTOP_HIT "TRIGGERED"
325
+	#define MSG_ENDSTOP_OPEN "open"
320 326
 
321 327
 	#define MSG_SD_CANT_OPEN_SUBDIR "Cannot open subdir"
322 328
 	#define MSG_SD_INIT_FAIL "SD init fail"
@@ -466,13 +472,15 @@
466 472
 #define MSG_UNKNOWN_COMMAND "Comando Desconocido:\""
467 473
 #define MSG_ACTIVE_EXTRUDER "Extrusor Activo: "
468 474
 #define MSG_INVALID_EXTRUDER "Extrusor Invalido"
469
-#define MSG_X_MIN "x_min:"
470
-#define MSG_X_MAX "x_max:"
471
-#define MSG_Y_MIN "y_min:"
472
-#define MSG_Y_MAX "y_max:"
473
-#define MSG_Z_MIN "z_min:"
474
-#define MSG_Z_MAX "z_max:"
475
-
475
+#define MSG_X_MIN "x_min: "
476
+#define MSG_X_MAX "x_max: "
477
+#define MSG_Y_MIN "y_min: "
478
+#define MSG_Y_MAX "y_max: "
479
+#define MSG_Z_MIN "z_min: "
480
+#define MSG_M119_REPORT "Reporting endstop status"
481
+#define MSG_ENDSTOP_HIT "TRIGGERED"
482
+#define MSG_ENDSTOP_OPEN "open"
483
+        
476 484
 #define MSG_SD_CANT_OPEN_SUBDIR "No se pudo abrir la subcarpeta."
477 485
 #define MSG_SD_INIT_FAIL "Fallo al iniciar la SD"
478 486
 #define MSG_SD_VOL_INIT_FAIL "Fallo al montar el volumen"

読み込み中…
キャンセル
保存