if (type != CEC_DEVICE_TYPE_RESERVED)
{
- for (uint8_t iPtr = 0; iPtr < 16; iPtr++)
+ for (uint8_t iPtr = 0; iPtr <= 11; iPtr++)
{
if (m_logicalAddresses[iPtr] && m_busDevices[iPtr]->m_type == type)
{
CCECAdapterMessage *output = new CCECAdapterMessage(data);
bReturn = Transmit(output);
- delete output;
+ /* set to "not present" on failed ack */
+ if (output->is_error() && output->reply == MSGCODE_TRANSMIT_FAILED_ACK &&
+ output->destination() != CECDEVICE_BROADCAST)
+ m_busDevices[output->destination()]->SetDeviceStatus(CEC_DEVICE_STATUS_NOT_PRESENT);
+
+ delete output;
return bReturn;
}
{
cout << "listing active devices:" << endl;
cec_logical_addresses addresses = parser->GetActiveDevices();
- for (uint8_t iPtr = 0; iPtr < 16; iPtr++)
+ for (uint8_t iPtr = 0; iPtr <= 11; iPtr++)
if (addresses[iPtr])
cout << "logical address " << (int)iPtr << endl;
return true;