From: Philipp Marek Date: Wed, 4 Jul 2018 12:41:17 +0000 (+0200) Subject: ir_nec: fix #1243, multiple capture frames. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=1865f48de72cebc0c8031bce8e5aaa2a3e1c5092;p=libsigrokdecode.git ir_nec: fix #1243, multiple capture frames. --- 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.