Multi-host support
This commit is contained in:
committed by
Scott Lahteine
parent
dabb75034c
commit
f7efac57b7
@ -26,15 +26,22 @@
|
||||
#include "../../libs/duration_t.h"
|
||||
#include "../../lcd/ultralcd.h"
|
||||
|
||||
#if NUM_SERIAL > 1
|
||||
#include "../../gcode/queue.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* M31: Get the time since the start of SD Print (or last M109)
|
||||
*/
|
||||
void GcodeSuite::M31() {
|
||||
#if NUM_SERIAL > 1
|
||||
const int16_t port = command_queue_port[cmd_queue_index_r];
|
||||
#endif
|
||||
char buffer[21];
|
||||
duration_t elapsed = print_job_timer.duration();
|
||||
elapsed.toString(buffer);
|
||||
lcd_setstatus(buffer);
|
||||
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPAIR("Print time: ", buffer);
|
||||
SERIAL_ECHO_START_P(port);
|
||||
SERIAL_ECHOLNPAIR_P(port, "Print time: ", buffer);
|
||||
}
|
||||
|
Reference in New Issue
Block a user