return false;
}
- if (!m_comm->Open(strPort, 38400, iTimeoutMs))
+ int64_t iNow = GetTimeMs();
+ int64_t iTarget = iNow + iTimeoutMs;
+
+ bool bOpened(false);
+ while (!bOpened && iNow < iTarget)
+ {
+ bOpened = m_comm->Open(strPort, 38400, iTimeoutMs);
+ iNow = GetTimeMs();
+ }
+
+ if (!bOpened)
{
AddLog(CEC_LOG_ERROR, "could not open a connection");
return false;
return m_cec ? m_cec->SetLogicalAddress(iLogicalAddress) : false;
}
+bool CLibCEC::SetPhysicalAddress(uint16_t iPhysicalAddress)
+{
+ return m_cec ? m_cec->SetPhysicalAddress(iPhysicalAddress) : false;
+}
+
bool CLibCEC::PowerOnDevices(cec_logical_address address /* = CECDEVICE_TV */)
{
return m_cec ? m_cec->PowerOnDevices(address) : false;