diff options
author | Philipp Marek <philipp@marek.priv.at> | 2018-07-04 14:41:17 +0200 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2019-11-29 22:01:56 +0100 |
commit | 1865f48de72cebc0c8031bce8e5aaa2a3e1c5092 (patch) | |
tree | 6f58b48b4f8708bf2ad04ea435932113b3ff198c | |
parent | 3bf6bf42536d5bb374be89fb50e2a2088371eee5 (diff) | |
download | libsigrokdecode-1865f48de72cebc0c8031bce8e5aaa2a3e1c5092.tar.gz libsigrokdecode-1865f48de72cebc0c8031bce8e5aaa2a3e1c5092.zip |
ir_nec: fix #1243, multiple capture frames.
-rw-r--r-- | decoders/ir_nec/pd.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/decoders/ir_nec/pd.py b/decoders/ir_nec/pd.py index bb52420..096ffc9 100644 --- a/decoders/ir_nec/pd.py +++ b/decoders/ir_nec/pd.py @@ -111,7 +111,6 @@ class Decoder(srd.Decoder): def start(self): self.out_ann = self.register(srd.OUTPUT_ANN) - self.active = 0 if self.options['polarity'] == 'active-low' else 1 def metadata(self, key, value): if key == srd.SRD_CONF_SAMPLERATE: @@ -164,7 +163,9 @@ class Decoder(srd.Decoder): cd_count = None if self.options['cd_freq']: cd_count = int(self.samplerate / self.options['cd_freq']) + 1 - prev_ir = None + prev_ir = None + + self.active = 0 if self.options['polarity'] == 'active-low' else 1 while True: # Detect changes in the presence of an active input signal. |