Browse Source

advanced 'ok'

ok N(linenumber) P(bufferremaining)
the host can use this to send the data much faster.

Some pseudo code:
If (bufferremaining > 0)  send command
## as long there is free buffer send command

Also
if (linenumber > lastsend - bufferremaining) send command
## as long last linenumber received is bigger than lastsend (host) - last bufferremaining received
Wurstnase 9 years ago
parent
commit
0cb87795a3
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      Marlin/Marlin_main.cpp

+ 2
- 1
Marlin/Marlin_main.cpp View File

5533
   SERIAL_PROTOCOLPGM(MSG_OK);
5533
   SERIAL_PROTOCOLPGM(MSG_OK);
5534
   #ifdef ADVANCED_OK
5534
   #ifdef ADVANCED_OK
5535
     SERIAL_PROTOCOLPGM(" N"); SERIAL_PROTOCOL(gcode_LastN);
5535
     SERIAL_PROTOCOLPGM(" N"); SERIAL_PROTOCOL(gcode_LastN);
5536
-    SERIAL_PROTOCOLPGM(" S"); SERIAL_PROTOCOLLN(commands_in_queue);
5536
+    SERIAL_PROTOCOLPGM(" P"); SERIAL_PROTOCOL(BUFSIZE - commands_in_queue);
5537
   #endif
5537
   #endif
5538
+  SERIAL_PROTOCOLLNPGM("");  
5538
 }
5539
 }
5539
 
5540
 
5540
 void get_coordinates() {
5541
 void get_coordinates() {

Loading…
Cancel
Save