G-code line number for each serial port (for TFTs) (#18165)

This commit is contained in:
Mark Scammacca
2020-06-01 22:19:10 -05:00
committed by GitHub
parent 53cb2963dc
commit 7119596170
3 changed files with 24 additions and 11 deletions

View File

@@ -35,7 +35,8 @@ public:
* commands to Marlin, and lines will be checked for sequentiality.
* M110 N<int> sets the current line number.
*/
static long last_N;
static long last_N[NUM_SERIAL];
/**
* GCode Command Queue
@@ -51,13 +52,21 @@ public:
static char command_buffer[BUFSIZE][MAX_CMD_SIZE];
/*
/**
* The port that the command was received on
*/
#if NUM_SERIAL > 1
static int16_t port[BUFSIZE];
#endif
static int16_t command_port() {
return (0
#if NUM_SERIAL > 1
+ port[index_r]
#endif
);
}
GCodeQueue();
/**