diff options
author | Soeren Apel <soeren@apelpie.net> | 2018-08-12 12:22:44 +0200 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2018-08-30 11:56:37 +0200 |
commit | 66cff5a67110b3e9a4884ac3d8f7742d6f755e30 (patch) | |
tree | bcbc4451daf0ece5e945e02666eff17f90adb46d /decoders/counter/pd.py | |
parent | d52bd4f2ca95cf9e19e7a2a18543dacb0dd2edfe (diff) | |
download | libsigrokdecode-66cff5a67110b3e9a4884ac3d8f7742d6f755e30.tar.gz libsigrokdecode-66cff5a67110b3e9a4884ac3d8f7742d6f755e30.zip |
counter: Consider edge counter offset also in word processing
Diffstat (limited to 'decoders/counter/pd.py')
-rw-r--r-- | decoders/counter/pd.py | 3 |
1 files changed, 2 insertions, 1 deletions
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 |