another small fix
This commit is contained in:
@ -80,6 +80,7 @@ ReturnValue_t PlocSupvUartManager::initializeInterface(CookieIF* cookie) {
|
||||
}
|
||||
// Flush received and unread data
|
||||
tcflush(serialPort, TCIOFLUSH);
|
||||
sif::debug << "serial port: " << serialPort << std::endl;
|
||||
return OK;
|
||||
}
|
||||
|
||||
@ -140,7 +141,8 @@ ReturnValue_t PlocSupvUartManager::handleUartReception() {
|
||||
ReturnValue_t result = OK;
|
||||
ReturnValue_t status = OK;
|
||||
sif::debug << "reading port " << serialPort << std::endl;
|
||||
ssize_t bytesRead = read(serialPort, reinterpret_cast<void*>(recBuf.data()),
|
||||
TaskFactory::delayTask(100);
|
||||
ssize_t bytesRead = read(302, reinterpret_cast<void*>(recBuf.data()),
|
||||
static_cast<unsigned int>(recBuf.size()));
|
||||
if (bytesRead == 0) {
|
||||
while (result != NO_PACKET_FOUND) {
|
||||
@ -968,6 +970,8 @@ ReturnValue_t PlocSupvUartManager::encodeAndSendPacket(const uint8_t* sendData,
|
||||
sif::debug << "Sending TC" << std::endl;
|
||||
arrayprinter::print(encodedSendBuf.data(), encodedLen);
|
||||
}
|
||||
sif::debug << "writing to serial port: " << serialPort << std::endl;
|
||||
TaskFactory::delayTask(50);
|
||||
size_t bytesWritten = write(serialPort, encodedSendBuf.data(), encodedLen);
|
||||
if (bytesWritten != encodedLen) {
|
||||
sif::warning
|
||||
|
Reference in New Issue
Block a user