pass
class Decoder(srd.Decoder):
- api_version = 2
+ api_version = 3
id = 'rgb_led_ws281x'
name = 'RGB LED (WS281x)'
longname = 'RGB LED string decoder (WS281x)'
self.bits = []
self.ss_packet = None
- def decode(self, ss, es, data):
+ def decode(self):
if not self.samplerate:
raise SamplerateError('Cannot decode without samplerate.')
- for (self.samplenum, (pin, )) in data:
+ while True:
+ # TODO: Come up with more appropriate self.wait() conditions.
+ (pin,) = self.wait({'skip': 1})
+
if self.oldpin is None:
self.oldpin = pin
continue