Check if reply to monitor command is a plain response, else hex decode the response.

This commit is contained in:
ccrause 2021-02-21 22:25:11 +02:00
parent 9c6de4853a
commit b27172ff12

View File

@ -847,11 +847,12 @@ var
begin
cmdstr := 'qRcmd,' + FHexEncodeStr(s);
result := FSendCmdWaitForReply(cmdstr, reply);
if Result then
begin
// Check if reply is not hex encoded, else decode reply
if Result and not((reply = '') or (reply = 'OK') or ((length(reply) = 3) and (reply[1] = 'E'))) then
reply := FHexDecodeStr(reply);
DebugLn(DBG_RSP, ['[Monitor '+s+'] reply: ', reply]);
end;
DebugLn(DBG_RSP, ['[Monitor '+s+'] reply: ', reply]);
end;
function TRspConnection.Init: integer;