Signed-off-by: Matt Ranostay <[email protected]>
---
 decoders/spi/pd.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/decoders/spi/pd.py b/decoders/spi/pd.py
index 679335e..fc1a5c4 100644
--- a/decoders/spi/pd.py
+++ b/decoders/spi/pd.py
@@ -192,7 +192,7 @@ class Decoder(srd.Decoder):
 
         # Guesstimate the endsample for this bit (can be overridden below).
         es = self.samplenum
-        if self.bitcount > 0:
+        if self.bitcount > 0 and self.have_miso:
             es += self.samplenum - self.misobits[0][1]
 
         if self.have_miso:
-- 
1.8.3.2


------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to