Multi-host support

This commit is contained in:
Thomas Moore
2017-11-05 08:49:38 -06:00
committed by Scott Lahteine
parent dabb75034c
commit f7efac57b7
41 changed files with 1192 additions and 747 deletions

View File

@ -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);
}