RPi: Add support for RS485 transport

Remove serial print from MyTransportRS485.cpp to increase speed.
This commit is contained in:
Marcelo Aquino
2016-10-21 09:01:37 -02:00
parent f10e142630
commit 76dea1532c
8 changed files with 85 additions and 18 deletions
+4 -1
View File
@@ -235,7 +235,10 @@ int SerialPort::peek()
void SerialPort::flush()
{
tcflush(sd, TCIFLUSH);
// Waits until all output written to sd has been transmitted
if (tcdrain(sd) < 0) {
logError("Couldn't flush serial: %s\n", strerror(errno));
}
}
void SerialPort::end()