From: Uwe Hermann Date: Fri, 9 Aug 2013 17:13:20 +0000 (+0200) Subject: pan1321: Properly check for \r\n, not just \n. X-Git-Tag: libsigrokdecode-0.3.0~338 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=72a6cad40c4df6e5e45216cd5f77d1b195168359;p=libsigrokdecode.git pan1321: Properly check for \r\n, not just \n. --- diff --git a/decoders/pan1321/pd.py b/decoders/pan1321/pd.py index 3799612..96d4385 100644 --- a/decoders/pan1321/pd.py +++ b/decoders/pan1321/pd.py @@ -116,7 +116,7 @@ class Decoder(srd.Decoder): self.cmd[rxtx] += chr(pdata) # Get packets/bytes until an \r\n sequence is found (end of command). - if self.cmd[rxtx][-1:] != '\n': + if self.cmd[rxtx][-2:] != '\r\n': return # Handle host commands and device replies.