From 229a2bc32fde109603da2c64a19f307d5a8cb6ee Mon Sep 17 00:00:00 2001 From: Phil Taylor Date: Thu, 4 Mar 2021 21:06:25 +0000 Subject: [PATCH] More linux fixes --- pttyhandler.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pttyhandler.cpp b/pttyhandler.cpp index 68f21ce..bf67547 100644 --- a/pttyhandler.cpp +++ b/pttyhandler.cpp @@ -156,16 +156,18 @@ void pttyHandler::sendDataOut(const QByteArray& writeData) qint64 bytesWritten; - bytesWritten = port->write(writeData); - + if (inPortData[2] != (char)0xE1) { + bytesWritten = port->write(writeData); + } if (bytesWritten != writeData.length()) { qDebug(logSerial()) << "bytesWritten: " << bytesWritten << " length of byte array: " << writeData.length()\ << " size of byte array: " << writeData.size()\ << " Wrote all bytes? " << (bool)(bytesWritten == (qint64)writeData.size()); } #else - port->write(writeData); - + if (inPortData[2] != (char)0xE1) { + port->write(writeData); + } #endif mutex.unlock(); }