Skip to content

Commit

Permalink
match to our ad hoc i2c "protocol"
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Jun 8, 2024
1 parent e6f22e3 commit bd2b23e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Marlin/src/gcode/feature/rs485/M485.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void GcodeSuite::M485() {
// Read and ignore any packets that may have come in, before we write.

while (rs485Packetizer.hasPacket()) {
SERIAL_ECHOPGM("rs485-unexpected-packet: ");
SERIAL_ECHO_START(); SERIAL_ECHOPGM("rs485-unexpected-packet: ");
write_packet_data();
rs485Packetizer.clearPacket();
}
Expand All @@ -99,9 +99,9 @@ void GcodeSuite::M485() {
//millis_t endTime = millis();
//SERIAL_ECHOLNPGM("rs485-time: ", endTime - startTime);

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

SERIAL_ECHOPGM("rs485-reply: ");
SERIAL_ECHO_START(); SERIAL_ECHOPGM("rs485-reply: ");
write_packet_data();
rs485Packetizer.clearPacket();
}
Expand Down

0 comments on commit bd2b23e

Please sign in to comment.