diff --git a/linux/devices/ScexUartReader.cpp b/linux/devices/ScexUartReader.cpp index 2af26781..b2138999 100644 --- a/linux/devices/ScexUartReader.cpp +++ b/linux/devices/ScexUartReader.cpp @@ -68,6 +68,18 @@ ReturnValue_t ScexUartReader::performOperation(uint8_t operationCode) { dleParser.confirmBytesRead(bytesRead); } } + // TODO: Move this to some FSFW helper function + /* + serial_icounter_struct uartErrors{}; + int ioctlres = ioctl(serialPort, TIOCGICOUNT, &uartErrors); + if (uartErrors.parity > 0) { + sif::warning << "Parity error. Current count: " << uartErrors.parity << std::endl; + } + if (uartErrors.overrun > 0) { + sif::warning << "Overrun error. Current count: " << uartErrors.overrun << std::endl; + } + */ + TaskFactory::delayTask(400); } else if (bytesRead < 0) { sif::warning << "ScexUartReader::performOperation: read call failed with error [" << errno @@ -132,7 +144,6 @@ ReturnValue_t ScexUartReader::initializeInterface(CookieIF *cookie) { sif::warning << "ScexUartReader::initializeInterface: Setting baud rate failed" << std::endl; } //#endif - if (tcsetattr(serialPort, TCSANOW, &tty) != 0) { sif::warning << "ScexUartReader::initializeInterface: tcsetattr call failed with error [" << errno << ", " << strerror(errno) << std::endl;