From 1865f48de72cebc0c8031bce8e5aaa2a3e1c5092 Mon Sep 17 00:00:00 2001 From: Philipp Marek Date: Wed, 4 Jul 2018 14:41:17 +0200 Subject: ir_nec: fix #1243, multiple capture frames. --- decoders/ir_nec/pd.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'decoders/ir_nec') 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. -- cgit v1.2.3-70-g09d2