]> sigrok.org Git - libsigrokdecode.git/commitdiff
pan1321: Properly check for \r\n, not just \n.
authorUwe Hermann <redacted>
Fri, 9 Aug 2013 17:13:20 +0000 (19:13 +0200)
committerUwe Hermann <redacted>
Mon, 2 Sep 2013 07:05:01 +0000 (09:05 +0200)
decoders/pan1321/pd.py

index 3799612bb2fd230157291a177fa9b5aac187c9a9..96d4385f4cffa949dadb2493285c79ae91ca1658 100644 (file)
@@ -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.