]> sigrok.org Git - libsigrokdecode.git/commitdiff
counter: Consider edge counter offset also in word processing
authorSoeren Apel <redacted>
Sun, 12 Aug 2018 10:22:44 +0000 (12:22 +0200)
committerUwe Hermann <redacted>
Thu, 30 Aug 2018 09:56:37 +0000 (11:56 +0200)
decoders/counter/pd.py

index 27a2be88dc07934f9eed9a33a90ddc121c5d7c70..9ed30c813e711b31e4794592ee39a243bdc718a0 100644 (file)
@@ -137,7 +137,8 @@ class Decoder(srd.Decoder):
             self.putc(ROW_EDGE, edge_start, ["{:d}".format(edge_count)])
             edge_start = now
 
-            if divider and (edge_count % divider) == 0:
+            word_edge_count = edge_count - int(self.options['edge_off'])
+            if divider and (word_edge_count % divider) == 0:
                 word_count += 1
                 self.putc(ROW_WORD, word_start, ["{:d}".format(word_count)])
                 word_start = now