X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fadapter%2FRPi%2FRPiCECAdapterMessageQueue.cpp;h=aa9701d3ec260c26139fc15bc15bd712de4fa051;hb=4f5046734389cc554448da5cee93970f3091348b;hp=df9a374dc4ad07b9746ebcd25a94dc7fff97c980;hpb=b0a5e4fc9b66620b00f937f7e9a406bf22aaaf1d;p=deb_libcec.git diff --git a/src/lib/adapter/RPi/RPiCECAdapterMessageQueue.cpp b/src/lib/adapter/RPi/RPiCECAdapterMessageQueue.cpp index df9a374..aa9701d 100644 --- a/src/lib/adapter/RPi/RPiCECAdapterMessageQueue.cpp +++ b/src/lib/adapter/RPi/RPiCECAdapterMessageQueue.cpp @@ -1,7 +1,7 @@ /* * This file is part of the libCEC(R) library. * - * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited. All rights reserved. + * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited. All rights reserved. * libCEC(R) is an original work, containing original code. * * libCEC(R) is a trademark of Pulse-Eight Limited. @@ -121,7 +121,7 @@ void CRPiCECAdapterMessageQueue::MessageReceived(cec_opcode opcode, cec_logical_ bHandled = it->second->MessageReceived(opcode, initiator, destination, response); if (!bHandled) - LIB_CEC->AddLog(CEC_LOG_WARNING, "unhandled response received"); + LIB_CEC->AddLog(CEC_LOG_WARNING, "unhandled response received: opcode=%x initiator=%x destination=%x response=%x", (int)opcode, (int)initiator, (int)destination, response); } bool CRPiCECAdapterMessageQueue::Write(const cec_command &command, bool bIsReply) @@ -151,11 +151,13 @@ bool CRPiCECAdapterMessageQueue::Write(const cec_command &command, bool bIsReply message.payload[iPtr + 1] = command.parameters.At(iPtr); } +#ifdef CEC_DEBUGGING CStdString strDump; strDump.Format("len = %d, payload = %X%X", message.length, (int)message.initiator, (int)message.follower); for (uint8_t iPtr = 0; iPtr < message.length - 1; iPtr++) strDump.AppendFormat(":%02X", message.payload[iPtr]); LIB_CEC->AddLog(CEC_LOG_DEBUG, "sending data: %s", strDump.c_str()); +#endif int iReturn = vc_cec_send_message2(&message); #else @@ -172,11 +174,13 @@ bool CRPiCECAdapterMessageQueue::Write(const cec_command &command, bool bIsReply payload[iPtr + 1] = command.parameters.At(iPtr); } +#ifdef CEC_DEBUGGING CStdString strDump; strDump.Format("len = %d, payload = %X%X", iLength, (int)command.initiator, (int)command.destination); for (uint8_t iPtr = 0; iPtr < iLength; iPtr++) strDump.AppendFormat(":%02X", payload[iPtr]); LIB_CEC->AddLog(CEC_LOG_DEBUG, "sending data: %s", strDump.c_str()); +#endif int iReturn = vc_cec_send_message((uint32_t)command.destination, (uint8_t*)&payload, iLength, bIsReply); #endif