add code to get frame, parity and overrun errors
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
Robin Müller 2022-10-05 19:18:25 +02:00
parent 9e81384c5e
commit adbece25aa

View File

@ -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;