Skip to content

Commit

Permalink
Merge pull request #5531 from binuinbaraj/sprint/24Q3
Browse files Browse the repository at this point in the history
RDKTV-29365 Retry to get wake up keycode when Unknown
  • Loading branch information
binuinbaraj authored Jul 15, 2024
2 parents 52e4d14 + edc7299 commit ad7de63
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions RDKShell/RDKShell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ static uint32_t gWillDestroyEventWaitTime = RDKSHELL_WILLDESTROY_EVENT_WAITTIME;

#define REMOTECONTROL_CALLSIGN "org.rdk.RemoteControl.1"
#define KEYCODE_INVALID -1
#define KEYCODE_UNKNOWN 255
#define RETRY_INTERVAL_250MS 250000

#define RDKSHELL_SURFACECLIENT_DISPLAYNAME "rdkshell_display"
Expand Down Expand Up @@ -6373,7 +6374,7 @@ namespace WPEFramework {
auto remoteControlConnection = RDKShell::getThunderControllerClient(remoteControlCallsign);
int16_t keyCode = KEYCODE_INVALID, retry = 12;

while( keyCode == KEYCODE_INVALID )
while( keyCode == KEYCODE_INVALID || keyCode == KEYCODE_UNKNOWN)
{
JsonObject req, res, stat;
req.Set("netType",1);
Expand Down Expand Up @@ -6405,7 +6406,7 @@ namespace WPEFramework {
std::cout << "getNetStatus failed\n" << std::endl;

retry--;
if ( (retry == 0) || (keyCode != KEYCODE_INVALID) )
if ( (retry == 0) || (keyCode != KEYCODE_INVALID && keyCode != KEYCODE_UNKNOWN) )
break;
usleep(RETRY_INTERVAL_250MS);
}
Expand Down

0 comments on commit ad7de63

Please sign in to comment.