ping working on Pi now
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
This commit is contained in:
parent
4eb5e8acba
commit
eb1b4f1b05
@ -151,6 +151,13 @@ void UartTestClass::scexInit() {
|
|||||||
tty.c_cc[VTIME] = 1; // In units of 0.1 seconds
|
tty.c_cc[VTIME] = 1; // In units of 0.1 seconds
|
||||||
tty.c_cc[VMIN] = 255; // Read up to 255 bytes
|
tty.c_cc[VMIN] = 255; // Read up to 255 bytes
|
||||||
|
|
||||||
|
// Q7S UART Lite has fixed baud rate. For other linux systems, set baud rate here.
|
||||||
|
#if !defined(XIPHOS_Q7S)
|
||||||
|
if (cfsetispeed(&tty, B57600) != 0) {
|
||||||
|
sif::warning << "UartTestClass::scexInit: Setting baud rate failed" << std::endl;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (tcsetattr(serialPort, TCSANOW, &tty) != 0) {
|
if (tcsetattr(serialPort, TCSANOW, &tty) != 0) {
|
||||||
sif::warning << "tcsetattr call failed with error [" << errno << ", " << strerror(errno)
|
sif::warning << "tcsetattr call failed with error [" << errno << ", " << strerror(errno)
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
@ -183,8 +190,8 @@ void UartTestClass::scexPeriodic() {
|
|||||||
sif::debug << "UartTestClass::performPeriodicAction: recv buffer might not be large enough"
|
sif::debug << "UartTestClass::performPeriodicAction: recv buffer might not be large enough"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
} else if (bytesRead > 0) {
|
} else if (bytesRead > 0) {
|
||||||
sif::info << "Received " << bytesRead << " from the Solar Cell Experiment:" << std::endl;
|
sif::info << "Received " << bytesRead << " bytes from the Solar Cell Experiment:" << std::endl;
|
||||||
arrayprinter::print(recBuf.data(), bytesRead);
|
arrayprinter::print(recBuf.data(), bytesRead, OutputType::HEX, false);
|
||||||
}
|
}
|
||||||
} while (bytesRead > 0);
|
} while (bytesRead > 0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user