Browse Source

Merge pull request #2985 from AnHardt/adv-ok

Repair N in ADVANCED_OK
Scott Lahteine 9 years ago
parent
commit
e1beaf61eb
1 changed files with 7 additions and 1 deletions
  1. 7
    1
      Marlin/Marlin_main.cpp

+ 7
- 1
Marlin/Marlin_main.cpp View File

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

Loading…
Cancel
Save