diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2014-10-13 17:05:07 +0200 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2014-10-13 17:07:14 +0200 |
commit | 486b19ce017c6663be6574dacd0c823304903bca (patch) | |
tree | 3c447933be4e4793cc0c26993cf294f3575ef4cd /decoders/ir_rc5 | |
parent | 95d11271b46a46788d497481d03177e883c8554e (diff) | |
download | libsigrokdecode-486b19ce017c6663be6574dacd0c823304903bca.tar.gz libsigrokdecode-486b19ce017c6663be6574dacd0c823304903bca.zip |
All PDs: More consistent names for ss/es variables.
Use self.ss/self.es, or if there's a need to differentiate
them a bit more, use self.ss_<suffix>/self.es_<suffix> consistently.
Also, drop some unused variables.
Diffstat (limited to 'decoders/ir_rc5')
-rw-r--r-- | decoders/ir_rc5/pd.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/decoders/ir_rc5/pd.py b/decoders/ir_rc5/pd.py index 4926cb6..e1dd42f 100644 --- a/decoders/ir_rc5/pd.py +++ b/decoders/ir_rc5/pd.py @@ -59,7 +59,7 @@ class Decoder(srd.Decoder): def __init__(self, **kwargs): self.samplerate = None self.samplenum = None - self.edges, self.bits, self.bits_ss_es = [], [], [] + self.edges, self.bits, self.ss_es_bits = [], [], [] self.state = 'IDLE' def start(self): @@ -73,7 +73,7 @@ class Decoder(srd.Decoder): self.halfbit = int((self.samplerate * 0.00178) / 2.0) def putb(self, bit1, bit2, data): - ss, es = self.bits_ss_es[bit1][0], self.bits_ss_es[bit2][1] + ss, es = self.ss_es_bits[bit1][0], self.ss_es_bits[bit2][1] self.put(ss, es, self.out_ann, data) def handle_bits(self): @@ -83,9 +83,9 @@ class Decoder(srd.Decoder): if i == 0: ss = max(0, self.bits[0][0] - self.halfbit) else: - ss = self.bits_ss_es[i - 1][1] + ss = self.ss_es_bits[i - 1][1] es = self.bits[i][0] + self.halfbit - self.bits_ss_es.append([ss, es]) + self.ss_es_bits.append([ss, es]) self.putb(i, i, [0, ['%d' % self.bits[i][1]]]) # Bits[0:0]: Startbit 1 s = ['Startbit1: %d' % b[0][1], 'SB1: %d' % b[0][1], 'SB1', 'S1', 'S'] @@ -132,7 +132,7 @@ class Decoder(srd.Decoder): return 'e' # Error, invalid edge distance. def reset_decoder_state(self): - self.edges, self.bits, self.bits_ss_es = [], [], [] + self.edges, self.bits, self.ss_es_bits = [], [], [] self.state = 'IDLE' def decode(self, ss, es, data): |