From: Lars Op den Kamp Date: Mon, 23 Apr 2012 12:02:58 +0000 (+0200) Subject: cec: fixed - the wrong setting was being read when powering on devices. added debug... X-Git-Tag: upstream/2.2.0~1^2~29^2^2~65 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=e2c644d2021f84f9540e6422a02c95032f0a8bb7;p=deb_libcec.git cec: fixed - the wrong setting was being read when powering on devices. added debug logging for wakeup/standby/activate source --- diff --git a/src/lib/CECProcessor.cpp b/src/lib/CECProcessor.cpp index 4bdc882..ea1a353 100644 --- a/src/lib/CECProcessor.cpp +++ b/src/lib/CECProcessor.cpp @@ -1048,7 +1048,10 @@ bool CCECProcessor::StandbyDevices(cec_logical_address address /* = CECDEVICE_BR for (uint8_t iPtr = 0; iPtr <= 0xF; iPtr++) { if (m_configuration.powerOffDevices[iPtr]) + { + CLibCEC::AddLog(CEC_LOG_DEBUG, "%s - putting '%s' in standby mode", __FUNCTION__, ToString((cec_logical_address)iPtr)); bReturn &= m_busDevices[iPtr]->Standby(); + } } return bReturn; } @@ -1063,8 +1066,11 @@ bool CCECProcessor::PowerOnDevices(cec_logical_address address /* = CECDEVICE_BR bool bReturn(true); for (uint8_t iPtr = 0; iPtr <= 0xF; iPtr++) { - if (m_configuration.powerOffDevices[iPtr]) + if (m_configuration.wakeDevices[iPtr]) + { + CLibCEC::AddLog(CEC_LOG_DEBUG, "%s - powering on '%s'", __FUNCTION__, ToString((cec_logical_address)iPtr)); bReturn &= m_busDevices[iPtr]->PowerOn(); + } } return bReturn; } diff --git a/src/lib/devices/CECBusDevice.cpp b/src/lib/devices/CECBusDevice.cpp index f340d54..13ba22e 100644 --- a/src/lib/devices/CECBusDevice.cpp +++ b/src/lib/devices/CECBusDevice.cpp @@ -1030,6 +1030,7 @@ void CCECBusDevice::SetUnsupportedFeature(cec_opcode opcode) bool CCECBusDevice::ActivateSource(void) { + CLibCEC::AddLog(CEC_LOG_DEBUG, "activating source '%s'", ToString(m_iLogicalAddress)); MarkBusy(); bool bReturn = m_handler->ActivateSource(); MarkReady();