Meatpack::report_state on serial port init (#20903)

Co-authored-by: Scott Lahteine <github@thinkyhead.com>
This commit is contained in:
ellensp
2021-01-28 20:47:12 +13:00
committed by Scott Lahteine
parent b10b76e882
commit 8da8e7d17b
10 changed files with 48 additions and 49 deletions

View File

@ -34,7 +34,7 @@ PGMSTR(SP_X_STR, " X"); PGMSTR(SP_Y_STR, " Y"); PGMSTR(SP_Z_STR, " Z"); PGMST
PGMSTR(SP_X_LBL, " X:"); PGMSTR(SP_Y_LBL, " Y:"); PGMSTR(SP_Z_LBL, " Z:"); PGMSTR(SP_E_LBL, " E:");
#if HAS_MULTI_SERIAL
int8_t serial_port_index = 0;
serial_index_t serial_port_index = 0;
#endif
void serialprintPGM(PGM_P str) {

View File

@ -61,9 +61,11 @@ extern uint8_t marlin_debug_flags;
//
// Serial redirection
//
typedef int8_t serial_index_t;
#define SERIAL_BOTH 0x7F
#if HAS_MULTI_SERIAL
extern int8_t serial_port_index;
extern serial_index_t serial_port_index;
#define _PORT_REDIRECT(n,p) REMEMBER(n,serial_port_index,p)
#define _PORT_RESTORE(n) RESTORE(n)