From 66cff5a67110b3e9a4884ac3d8f7742d6f755e30 Mon Sep 17 00:00:00 2001 From: Soeren Apel Date: Sun, 12 Aug 2018 12:22:44 +0200 Subject: counter: Consider edge counter offset also in word processing --- decoders/counter/pd.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'decoders') 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 -- cgit v1.2.3-70-g09d2