Browse Source

Repair N in ADVANCED_OK

Send the correct line number.
If no N was in the command - non't send an N.
AnHardt 9 years ago
parent
commit
6f473f7fc6
1 changed files with 7 additions and 1 deletions
  1. 7
    1
      Marlin/Marlin_main.cpp

+ 7
- 1
Marlin/Marlin_main.cpp View File

@@ -6263,7 +6263,13 @@ void ok_to_send() {
6263 6263
   #endif
6264 6264
   SERIAL_PROTOCOLPGM(MSG_OK);
6265 6265
   #if ENABLED(ADVANCED_OK)
6266
-    SERIAL_PROTOCOLPGM(" N"); SERIAL_PROTOCOL(gcode_LastN);
6266
+    char* p = command_queue[cmd_queue_index_r];
6267
+    if (*p == 'N') {
6268
+      SERIAL_PROTOCOL(' ');
6269
+      SERIAL_ECHO(*p++);
6270
+      while ((*p >= '0' && *p <= '9') || *p == '-')
6271
+        SERIAL_ECHO(*p++);
6272
+    }
6267 6273
     SERIAL_PROTOCOLPGM(" P"); SERIAL_PROTOCOL(int(BLOCK_BUFFER_SIZE - movesplanned() - 1));
6268 6274
     SERIAL_PROTOCOLPGM(" B"); SERIAL_PROTOCOL(BUFSIZE - commands_in_queue);
6269 6275
   #endif

Loading…
Cancel
Save