Allow SERIAL_ECHOPAIR to take up to 12 pairs (#13311)

This commit is contained in:
Scott Lahteine
2019-03-05 06:46:19 -06:00
committed by GitHub
parent 4771e372a1
commit cfdb38eda4
30 changed files with 474 additions and 611 deletions

View File

@ -150,9 +150,7 @@ bool enqueue_and_echo_command(const char* cmd) {
if (_enqueuecommand(cmd)) {
SERIAL_ECHO_START();
SERIAL_ECHOPAIR(MSG_ENQUEUEING, cmd);
SERIAL_CHAR('"');
SERIAL_EOL();
SERIAL_ECHOLNPAIR(MSG_ENQUEUEING, cmd, "\"");
return true;
}
return false;
@ -398,9 +396,10 @@ void gcode_line_error(PGM_P const err, const int8_t port) {
stream_state = StreamState::PACKET_RESET;
bytes_received = 0;
time_stream_start = millis();
SERIAL_ECHOPAIR("echo: Datastream initialized (", stream_header.filesize);
SERIAL_ECHOLNPGM(" bytes expected)");
SERIAL_ECHOLNPAIR("so", buffer_size); // confirm active stream and the maximum block size supported
// confirm active stream and the maximum block size supported
SERIAL_ECHO_START();
SERIAL_ECHOLNPAIR("Datastream initialized (", stream_header.filesize, " bytes expected)");
SERIAL_ECHOLNPAIR("so", buffer_size);
}
else {
SERIAL_ECHO_MSG("Datastream init error (invalid token)");
@ -468,8 +467,7 @@ void gcode_line_error(PGM_P const err, const int8_t port) {
}
else {
SERIAL_ECHO_START();
SERIAL_ECHOPAIR("Block(", packet.header.id);
SERIAL_ECHOLNPGM(") Corrupt");
SERIAL_ECHOLNPAIR("Block(", packet.header.id, ") Corrupt");
stream_state = StreamState::PACKET_FLUSHRX;
}
break;
@ -504,8 +502,7 @@ void gcode_line_error(PGM_P const err, const int8_t port) {
card.flag.binary_mode = false;
SERIAL_ECHO_START();
SERIAL_ECHO(card.filename);
SERIAL_ECHOPAIR(" transfer completed @ ", ((bytes_received / (millis() - time_stream_start) * 1000) / 1024));
SERIAL_ECHOLNPGM("KiB/s");
SERIAL_ECHOLNPAIR(" transfer completed @ ", ((bytes_received / (millis() - time_stream_start) * 1000) / 1024), "KiB/s");
SERIAL_ECHOLNPGM("sc"); // transmit stream complete token
card.closefile();
return;