X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=decoders%2Fir_nec%2Fpd.py;h=05c8c006655797ccf03b323f6cb92660f4e61dda;hp=0c4987f6fe234dc56ec2fb6e8fca16db42940e03;hb=85f616edfa157ae6ed8ea9ea4a72b930816e4dc9;hpb=f759507a3ab0f774716fdaedc8a1580017309f47 diff --git a/decoders/ir_nec/pd.py b/decoders/ir_nec/pd.py index 0c4987f..05c8c00 100644 --- a/decoders/ir_nec/pd.py +++ b/decoders/ir_nec/pd.py @@ -228,9 +228,12 @@ class Decoder(srd.Decoder): (self.ir,) = self.wait({Pin.IR: 'e'}) if self.ir != active: - # Save the non-active edge, then wait for the next edge. + # Save the location of the non-active edge (recessive), + # then wait for the next edge. Immediately process the + # end of the STOP bit which completes an IR frame. self.ss_other_edge = self.samplenum - continue + if self.state != 'STOP': + continue # Reset internal state for long periods of idle level. width = self.samplenum - self.ss_bit