Skip to content

Commit b622c80

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

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -83,6 +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_ECHO_START();
8687
SERIAL_ECHOPGM("rs485-unexpected-packet: ");
8788
write_packet_data();
8889
rs485Packetizer.clearPacket();
@@ -99,9 +100,9 @@ void GcodeSuite::M485() {
99100
//millis_t endTime = millis();
100101
//SERIAL_ECHOLNPGM("rs485-time: ", endTime - startTime);
101102

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

104-
SERIAL_ECHOPGM("rs485-reply: ");
105+
SERIAL_ECHO_START(); SERIAL_ECHOPGM("rs485-reply: ");
105106
write_packet_data();
106107
rs485Packetizer.clearPacket();
107108
}

0 commit comments

Comments
 (0)