X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=decoders%2Fnunchuk.py;h=8bf0228e03b5b722970cd5c207422e1cd8b063ba;hp=009459db861d09736f516fa9c00ba057263828fa;hb=9a12a6e7af3d7091d8e35dd1c731402cb80a01b0;hpb=677d597b072c0a1d2df81c5c193cd3678aef8d03 diff --git a/decoders/nunchuk.py b/decoders/nunchuk.py index 009459d..8bf0228 100644 --- a/decoders/nunchuk.py +++ b/decoders/nunchuk.py @@ -75,11 +75,9 @@ class Decoder(srd.Decoder): outputs = ['nunchuck'] probes = [] # TODO options = {} + annotations = [] def __init__(self, **kwargs): - self.out_proto = None - self.out_ann = None - self.state = IDLE # TODO: Can we assume a certain initial state? self.sx = self.sy = self.ax = self.ay = self.az = self.bz = self.bc = 0 @@ -87,8 +85,8 @@ class Decoder(srd.Decoder): self.databytecount = 0 def start(self, metadata): - # self.out_proto = self.add(srd.SRD_OUTPUT_PROTO, 'nunchuk') - self.out_ann = self.add(srd.SRD_OUTPUT_ANN, 'nunchuk') + # self.out_proto = self.add(srd.OUTPUT_PROTO, 'nunchuk') + self.out_ann = self.add(srd.OUTPUT_ANN, 'nunchuk') def report(self): pass