desc = 'RC-5 infrared remote control protocol.'
license = 'gplv2+'
inputs = ['logic']
- outputs = ['ir_rc5']
+ outputs = []
+ tags = ['IR']
channels = (
{'id': 'ir', 'name': 'IR', 'desc': 'IR data line'},
)
)
def __init__(self):
+ self.reset()
+
+ def reset(self):
self.samplerate = None
self.samplenum = None
self.edges, self.bits, self.ss_es_bits = [], [], []
# State machine.
if self.state == 'IDLE':
+ bit = 1
self.edges.append(self.samplenum)
- self.bits.append([self.samplenum, 1])
+ self.bits.append([self.samplenum, bit])
self.state = 'MID1'
self.old_ir = self.ir
continue