From e2c644d2021f84f9540e6422a02c95032f0a8bb7 Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Mon, 23 Apr 2012 14:02:58 +0200 Subject: [PATCH] cec: fixed - the wrong setting was being read when powering on devices. added debug logging for wakeup/standby/activate source --- src/lib/CECProcessor.cpp | 8 +++++++- src/lib/devices/CECBusDevice.cpp | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) 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(); -- 2.34.1