Skip to content

Commit acd3f22

Browse files
kiruba115apatel859
andauthored
RDKEMW-9750 HdmiCecSource/Sink issues (#280)
* RDKEMW-9750 HdmiCecSource/Sink issues Reason for change: Remove CEC device when there is a ping exception Test Procedure: Unplug the HDMI cable and check if the removeDevice() is called. Risks: None Priority: P1 * Update HdmiCecSourceImplementation.cpp * Update HdmiCecSourceImplementation.cpp * Update HdmiCecSourceImplementation.cpp --------- Co-authored-by: apatel859 <[email protected]>
1 parent e9d3419 commit acd3f22

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

HdmiCecSource/HdmiCecSourceImplementation.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ static PhysicalAddress physical_addr = {0x0F,0x0F,0x0F,0x0F};
7373
static LogicalAddress logicalAddress = 0xF;
7474
static OSDName osdName = "TV Box";
7575
static int32_t powerState = 1;
76-
static PowerStatus tvPowerState = 1;
76+
static PowerStatus tvPowerState;
7777
static bool isDeviceActiveSource = false;
7878
static bool isLGTvConnected = false;
7979

@@ -320,8 +320,8 @@ namespace WPEFramework
320320
void HdmiCecSourceProcessor::process (const ReportPowerStatus &msg, const Header &header)
321321
{
322322
printHeader(header);
323-
if ((header.from == LogicalAddress(LogicalAddress::TV)))
324-
tvPowerState = msg.status;
323+
if ((header.from == LogicalAddress(LogicalAddress::TV)))
324+
tvPowerState = msg.status;
325325
LOGINFO("Command: ReportPowerStatus TV Power Status from:%s status : %s \n",header.from.toString().c_str(),msg.status.toString().c_str());
326326
HdmiCecSourceImplementation::_instance->addDevice(header.from.toInt());
327327
}
@@ -1378,6 +1378,7 @@ namespace WPEFramework
13781378
catch(IOException &e)
13791379
{
13801380
LOGINFO("Device is not reachable: %d. Ping caught %s\r\n",idev, e.what());
1381+
removeDevice (idev);
13811382
isConnected = false;
13821383
return isConnected;;
13831384
}

0 commit comments

Comments
 (0)