Skip to content

Commit 249e4e5

Browse files
committed
Improve debug logging, log when command is OK
1 parent 4db863a commit 249e4e5

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

hardware/PanasonicTV.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ int CPanasonicNode::handleMessage(std::string pMessage)
338338
int iPosEnd = 0;
339339
std::string begin(">");
340340
std::string end("<");
341-
//std::string ResponseOK("HTTP/1.1 200");
341+
std::string ResponseOK("HTTP/1.1 200");
342342
std::string ResponseOff("HTTP/1.1 400");
343343

344344
if (pMessage == "ERROR" || pMessage == "")
@@ -347,6 +347,15 @@ int CPanasonicNode::handleMessage(std::string pMessage)
347347
return -1;
348348
}
349349

350+
// Look for a 200 response as this indicates that the TV was ok with last command.
351+
iPosBegin = pMessage.find(ResponseOK);
352+
if (iPosBegin != std::string::npos)
353+
{
354+
if (DEBUG_LOGGING) _log.Log(LOG_NORM, "Panasonic Plugin: (%s) Last command response OK", m_Name.c_str());
355+
}
356+
357+
iPosBegin = 0;
358+
350359
// Look for a 400 response as this indicates that the TV supports powering on.
351360
iPosBegin = pMessage.find(ResponseOff);
352361
if (iPosBegin != std::string::npos)

0 commit comments

Comments
 (0)