pass
class Decoder(srd.Decoder):
- api_version = 2
+ api_version = 3
id = 'dali'
name = 'DALI'
longname = 'Digital Addressable Lighting Interface'
self.edges, self.bits, self.ss_es_bits = [], [], []
self.state = 'IDLE'
- def decode(self, ss, es, data):
+ def decode(self):
if not self.samplerate:
raise SamplerateError('Cannot decode without samplerate.')
bit = 0
- for (self.samplenum, pins) in data:
- self.dali = pins[0]
+ while True:
+ # TODO: Come up with more appropriate self.wait() conditions.
+ (self.dali,) = self.wait({'skip': 1})
if self.options['polarity'] == 'active-high':
self.dali ^= 1 # Invert.