using namespace CEC;
-#define ToString(p) CCECCommandHandler::ToString(p)
+#define ToString(p) m_processor->ToString(p)
CCECBusDevice::CCECBusDevice(CCECProcessor *processor, cec_logical_address iLogicalAddress, uint16_t iPhysicalAddress) :
m_type(CEC_DEVICE_TYPE_RESERVED),
cec_command::Format(command, GetMyLogicalAddress(), m_iLogicalAddress, CEC_OPCODE_IMAGE_VIEW_ON);
if (m_processor->Transmit(command))
{
- RequestPowerStatus();
+ {
+ CLockObject lock(&m_mutex);
+ m_powerStatus = CEC_POWER_STATUS_UNKNOWN;
+ }
+ cec_power_status status = GetPowerStatus();
+ if (status == CEC_POWER_STATUS_STANDBY || status == CEC_POWER_STATUS_UNKNOWN)
+ {
+ SendKeypress(CEC_USER_CONTROL_CODE_POWER, true);
+ return SendKeyRelease(false);
+ }
return true;
}