X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2FAdapterCommunication.cpp;h=df803f5c2f47f420b980bcab2ac026ee555d5e8c;hb=b4c4ef7d6a74e5f6f8f7c67f3d11454f32301b60;hp=caa8442c1b59185dbf37e6ab52eb0c946ca38517;hpb=8d915412796290269f7efd48dc5e6802d82f5f15;p=deb_libcec.git diff --git a/src/lib/AdapterCommunication.cpp b/src/lib/AdapterCommunication.cpp index caa8442..df803f5 100644 --- a/src/lib/AdapterCommunication.cpp +++ b/src/lib/AdapterCommunication.cpp @@ -289,8 +289,8 @@ bool CAdapterCommunication::Open(const char *strPort, uint16_t iBaudRate /* = 38 m_processor->AddLog(CEC_LOG_DEBUG, "connection opened"); //clear any input bytes - uint8_t buff[1024]; - while (m_port->Read(buff, sizeof(buff), 1000) > 0) {} + uint8_t buff[1]; + while (m_port->Read(buff, 1, 5) == 1) {} if (CreateThread()) { @@ -323,7 +323,7 @@ void *CAdapterCommunication::Process(void) while (!IsStopped()) { - ReadFromDevice(500); + ReadFromDevice(50); Sleep(5); WriteNextCommand(); }