Skip to content

Commit 61d98c6

Browse files
committed
match to our ad hoc i2c "protocol"
1 parent e6f22e3 commit 61d98c6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Marlin/src/gcode/feature/rs485/M485.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ void GcodeSuite::M485() {
8383
// Read and ignore any packets that may have come in, before we write.
8484

8585
while (rs485Packetizer.hasPacket()) {
86-
SERIAL_ECHOPGM("rs485-unexpected-packet: ");
86+
SERIAL_ECHO_START(); SERIAL_ECHOPGM("rs485-unexpected-packet: ");
8787
write_packet_data();
8888
rs485Packetizer.clearPacket();
8989
}
@@ -97,9 +97,11 @@ void GcodeSuite::M485() {
9797
//millis_t startTime = millis();
9898
bool hasPacket = rs485Packetizer.hasPacket();
9999
//millis_t endTime = millis();
100-
//SERIAL_ECHOLNPGM("rs485-time: ", endTime - startTime);
100+
//SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("rs485-time: ", endTime - startTime);
101101

102-
if (!hasPacket) { SERIAL_ECHOLNPGM("rs485-reply: TIMEOUT"); return; }
102+
SERIAL_ECHO_START();
103+
104+
if (!hasPacket) { SERIAL_ECHOLNPGM("rs485-timeout"); return; }
103105

104106
SERIAL_ECHOPGM("rs485-reply: ");
105107
write_packet_data();

0 commit comments

Comments
 (0)