]> sigrok.org Git - libsigrokdecode.git/commitdiff
avr_isp: Fix a bug resulting in incorrect start samples.
authorUwe Hermann <redacted>
Sat, 1 Feb 2014 13:46:52 +0000 (14:46 +0100)
committerUwe Hermann <redacted>
Sat, 1 Feb 2014 14:59:07 +0000 (15:59 +0100)
decoders/avr_isp/pd.py

index be8ee29fee464054b3e3ceddd61a11e579fee8e6..05a46ec541295bfaaa2c88a90f05c1582a61a87b 100644 (file)
@@ -177,13 +177,13 @@ class Decoder(srd.Decoder):
 
         self.ss, self.es = ss, es
 
+        if len(self.mosi_bytes) == 0:
+            self.cmd_ss = ss
+
         # Append new bytes.
         self.mosi_bytes.append(mosi)
         self.miso_bytes.append(miso)
 
-        if len(self.mosi_bytes) == 0:
-            self.cmd_ss = ss
-
         # All commands consist of 4 bytes.
         if len(self.mosi_bytes) < 4:
             return