repositories
/
deb_libcec.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b4c4ef7
)
cec: be a bit more verbose when initialising
author
Lars Op den Kamp
<lars@opdenkamp.eu>
Sun, 4 Dec 2011 20:21:57 +0000
(21:21 +0100)
committer
Lars Op den Kamp
<lars@opdenkamp.eu>
Sun, 4 Dec 2011 20:21:57 +0000
(21:21 +0100)
src/lib/CECProcessor.cpp
patch
|
blob
|
blame
|
history
src/lib/CECProcessor.h
patch
|
blob
|
blame
|
history
src/lib/implementations/SLCommandHandler.cpp
patch
|
blob
|
blame
|
history
src/testclient/main.cpp
patch
|
blob
|
blame
|
history
diff --git
a/src/lib/CECProcessor.cpp
b/src/lib/CECProcessor.cpp
index dfdb737da3aeab2f126600bc6bebe11a29d6e514..8e761b10e4b3edaf50fc633b475a9e568556be1e 100644
(file)
--- a/
src/lib/CECProcessor.cpp
+++ b/
src/lib/CECProcessor.cpp
@@
-154,14
+154,18
@@
bool CCECProcessor::Start(const char *strPort, uint16_t iBaudRate /* = 38400 */,
if (SetAckMask(m_logicalAddresses.AckMask()) &&
SetHDMIPort(m_iBaseDevice, m_iHDMIPort, true))
{
if (SetAckMask(m_logicalAddresses.AckMask()) &&
SetHDMIPort(m_iBaseDevice, m_iHDMIPort, true))
{
+ m_controller->AddLog(CEC_LOG_ERROR, "processor thread started");
m_busScan = new CCECBusScan(this);
m_busScan->CreateThread(true);
return true;
}
m_busScan = new CCECBusScan(this);
m_busScan->CreateThread(true);
return true;
}
+ else
+ {
+ m_controller->AddLog(CEC_LOG_ERROR, "failed to initialise the processor");
+ }
}
}
- else
- m_controller->AddLog(CEC_LOG_ERROR, "could not create a processor thread");
+ m_controller->AddLog(CEC_LOG_ERROR, "could not create a processor thread");
return false;
}
return false;
}
@@
-401,7
+405,7
@@
bool CCECProcessor::SetHDMIPort(cec_logical_address iBaseDevice, uint8_t iPort,
iPhysicalAddress += (uint16_t)(iPort * iPos);
strLog.Format("checking physical address %4x", iPhysicalAddress);
AddLog(CEC_LOG_DEBUG, strLog);
iPhysicalAddress += (uint16_t)(iPort * iPos);
strLog.Format("checking physical address %4x", iPhysicalAddress);
AddLog(CEC_LOG_DEBUG, strLog);
- if (
CheckPhysicalAddress
(iPhysicalAddress))
+ if (
PhysicalAddressInUse
(iPhysicalAddress))
{
strLog.Format("physical address %4x is in use", iPhysicalAddress);
AddLog(CEC_LOG_DEBUG, strLog);
{
strLog.Format("physical address %4x is in use", iPhysicalAddress);
AddLog(CEC_LOG_DEBUG, strLog);
@@
-409,6
+413,8
@@
bool CCECProcessor::SetHDMIPort(cec_logical_address iBaseDevice, uint8_t iPort,
}
else
{
}
else
{
+ strLog.Format("physical address %4x is free", iPhysicalAddress);
+ AddLog(CEC_LOG_DEBUG, strLog);
SetPhysicalAddress(iPhysicalAddress);
bReturn = true;
}
SetPhysicalAddress(iPhysicalAddress);
bReturn = true;
}
@@
-417,7
+423,7
@@
bool CCECProcessor::SetHDMIPort(cec_logical_address iBaseDevice, uint8_t iPort,
return bReturn;
}
return bReturn;
}
-bool CCECProcessor::
CheckPhysicalAddress
(uint16_t iPhysicalAddress)
+bool CCECProcessor::
PhysicalAddressInUse
(uint16_t iPhysicalAddress)
{
for (unsigned int iPtr = 0; iPtr < 15; iPtr++)
{
{
for (unsigned int iPtr = 0; iPtr < 15; iPtr++)
{
diff --git
a/src/lib/CECProcessor.h
b/src/lib/CECProcessor.h
index 82dc1499f5f25573856a51577c80463627e44923..052dc993834a62d1b656ba30d33d4ec75580efd6 100644
(file)
--- a/
src/lib/CECProcessor.h
+++ b/
src/lib/CECProcessor.h
@@
-126,7
+126,7
@@
namespace CEC
private:
void ScanCECBus(void);
private:
void ScanCECBus(void);
- bool
CheckPhysicalAddress
(uint16_t iPhysicalAddress);
+ bool
PhysicalAddressInUse
(uint16_t iPhysicalAddress);
bool TryLogicalAddress(cec_logical_address address);
bool FindLogicalAddressRecordingDevice(void);
bool FindLogicalAddressTuner(void);
bool TryLogicalAddress(cec_logical_address address);
bool FindLogicalAddressRecordingDevice(void);
bool FindLogicalAddressTuner(void);
diff --git
a/src/lib/implementations/SLCommandHandler.cpp
b/src/lib/implementations/SLCommandHandler.cpp
index 197db43fdef7cb6fcd9c6b6746b3a38c6086fae8..76007cc2f4f587c15c9ff58de7c31c131816cb31 100644
(file)
--- a/
src/lib/implementations/SLCommandHandler.cpp
+++ b/
src/lib/implementations/SLCommandHandler.cpp
@@
-85,7
+85,8
@@
bool CSLCommandHandler::HandleVendorCommand(const cec_command &command)
else if (command.parameters.size == 1 &&
command.parameters[0] == SL_COMMAND_REQUEST_VENDOR_ID)
{
else if (command.parameters.size == 1 &&
command.parameters[0] == SL_COMMAND_REQUEST_VENDOR_ID)
{
- TransmitLGVendorId(m_busDevice->GetProcessor()->GetLogicalAddresses().primary, CECDEVICE_BROADCAST);
+// if (command.destination != CECDEVICE_BROADCAST)
+// m_busDevice->GetProcessor()->m_busDevices[m_busDevice->GetProcessor()->GetLogicalAddresses().primary]->TransmitPowerState(command.initiator);
return true;
}
return true;
}
@@
-156,6
+157,10
@@
bool CSLCommandHandler::HandleCommand(const cec_command &command)
m_bSkipNextVendorId = true;
TransmitLGVendorId(m_busDevice->GetProcessor()->GetLogicalAddresses().primary, CECDEVICE_BROADCAST);
}
m_bSkipNextVendorId = true;
TransmitLGVendorId(m_busDevice->GetProcessor()->GetLogicalAddresses().primary, CECDEVICE_BROADCAST);
}
+ else
+ {
+ m_bSkipNextVendorId = false;
+ }
m_bSLEnabled = false;
}
bHandled = true;
m_bSLEnabled = false;
}
bHandled = true;
diff --git
a/src/testclient/main.cpp
b/src/testclient/main.cpp
index 0ac1c714633b225bf7b263d2491dfd8ab3afaaee..9d40c39dc1b7bc180659a81ce9086b77cb1b80ee 100644
(file)
--- a/
src/testclient/main.cpp
+++ b/
src/testclient/main.cpp
@@
-997,6
+997,7
@@
int main (int argc, char *argv[])
if (!g_bSingleCommand)
{
if (!g_bSingleCommand)
{
+ FlushLog(parser);
cout << "cec device opened" << endl;
parser->PowerOnDevices(CECDEVICE_TV);
cout << "cec device opened" << endl;
parser->PowerOnDevices(CECDEVICE_TV);