Skip to content

Commit 05d7b78

Browse files
committed
RDKEMW-1061: RDK-E Add COMRPC
Reason for change: Create the interface file for HdmiCecSource Test Procedure: Risks: low Priority: P1 Signed-off-by:Hayden Gfeller [email protected]
1 parent 4cb8a4d commit 05d7b78

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

HdmiCecSource/HdmiCecSourceImplementation.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,8 @@ namespace WPEFramework
413413
ASSERT(service != nullptr);
414414
PowerState pwrStateCur = WPEFramework::Exchange::IPowerManager::POWER_STATE_UNKNOWN;
415415
PowerState pwrStatePrev = WPEFramework::Exchange::IPowerManager::POWER_STATE_UNKNOWN;
416+
uint32_t res = Core::ERROR_GENERAL;
417+
string msg;
416418
if (Utils::IARM::init()) {
417419
//Initialize cecEnableStatus to false in ctor
418420
cecEnableStatus = false;
@@ -475,7 +477,6 @@ namespace WPEFramework
475477
msg = "IARM bus is not available";
476478
LOGERR("IARM bus is not available. Failed to activate HdmiCecSource Plugin");
477479
}
478-
_powerManagerPlugin = service->QueryInterface<PowerManagerInterface>();
479480
ASSERT(_powerManagerPlugin);
480481
registerEventHandlers();
481482
return Core::ERROR_NONE;
@@ -643,12 +644,12 @@ namespace WPEFramework
643644
return Core::ERROR_NONE;
644645
}
645646

646-
uint32_t HdmiCecSourceImplementation::SendKeyPressEvent(const int &logicalAddress, int &keyCode, bool &success)
647+
uint32_t HdmiCecSourceImplementation::SendKeyPressEvent(const int &logicalAddress,const int &keyCode, bool &success)
647648
{
648649
SendKeyInfo keyInfo;
649650
try {
650-
keyInfo.logicalAddr = std::stoi(logicalAddress);
651-
keyInfo.keyCode = std::stoi(keyCode);
651+
keyInfo.logicalAddr = logicalAddress;
652+
keyInfo.keyCode = keyCode;
652653
} catch (const std::invalid_argument& e) {
653654
std::cerr << "Invalid input: " << e.what() << std::endl;
654655
success = false;
@@ -1229,7 +1230,7 @@ namespace WPEFramework
12291230
unsigned int vendorIdInt = 0;
12301231
try
12311232
{
1232-
vendorIdInt = std::stoi(vendorid,NULL,16);
1233+
vendorIdInt = stoi(vendorid,NULL,16);
12331234
}
12341235
catch (...)
12351236
{

0 commit comments

Comments
 (0)