add code to get frame, parity and overrun errors
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
This commit is contained in:
parent
9e81384c5e
commit
adbece25aa
@ -68,6 +68,18 @@ ReturnValue_t ScexUartReader::performOperation(uint8_t operationCode) {
|
|||||||
dleParser.confirmBytesRead(bytesRead);
|
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);
|
TaskFactory::delayTask(400);
|
||||||
} else if (bytesRead < 0) {
|
} else if (bytesRead < 0) {
|
||||||
sif::warning << "ScexUartReader::performOperation: read call failed with error [" << errno
|
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;
|
sif::warning << "ScexUartReader::initializeInterface: Setting baud rate failed" << std::endl;
|
||||||
}
|
}
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
if (tcsetattr(serialPort, TCSANOW, &tty) != 0) {
|
if (tcsetattr(serialPort, TCSANOW, &tty) != 0) {
|
||||||
sif::warning << "ScexUartReader::initializeInterface: tcsetattr call failed with error ["
|
sif::warning << "ScexUartReader::initializeInterface: tcsetattr call failed with error ["
|
||||||
<< errno << ", " << strerror(errno) << std::endl;
|
<< errno << ", " << strerror(errno) << std::endl;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user