From: Soeren Apel Date: Sun, 12 Aug 2018 10:22:44 +0000 (+0200) Subject: counter: Consider edge counter offset also in word processing X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=66cff5a67110b3e9a4884ac3d8f7742d6f755e30;p=libsigrokdecode.git counter: Consider edge counter offset also in word processing --- diff --git a/decoders/counter/pd.py b/decoders/counter/pd.py index 27a2be8..9ed30c8 100644 --- a/decoders/counter/pd.py +++ b/decoders/counter/pd.py @@ -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