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())
{
while (!IsStopped())
{
- ReadFromDevice(500);
+ ReadFromDevice(50);
Sleep(5);
WriteNextCommand();
}