X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=decoders%2Fnunchuk%2Fpd.py;h=d4fe34afeb28dae8f07f5471f616b092503df7ca;hb=a74855de187198624fefd2c12ef8355e5a869f80;hp=5c719cbd79ccdd18bb827eabbe31ef02889a7516;hpb=0169f19c53e195df2f96c4df731ad3214c59e20a;p=libsigrokdecode.git diff --git a/decoders/nunchuk/pd.py b/decoders/nunchuk/pd.py index 5c719cb..d4fe34a 100644 --- a/decoders/nunchuk/pd.py +++ b/decoders/nunchuk/pd.py @@ -18,8 +18,6 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## -# Nintendo Wii Nunchuk protocol decoder - import sigrokdecode as srd class Decoder(srd.Decoder): @@ -35,9 +33,9 @@ class Decoder(srd.Decoder): optional_probes = [] options = {} annotations = [ - ['Text (verbose)', 'Human-readable text (verbose)'], - ['Text', 'Human-readable text'], - ['Warnings', 'Human-readable warnings'], + ['text-verbose', 'Human-readable text (verbose)'], + ['text', 'Human-readable text'], + ['warnings', 'Human-readable warnings'], ] def __init__(self, **kwargs): @@ -48,15 +46,15 @@ class Decoder(srd.Decoder): self.init_seq = [] def start(self): - # self.out_proto = self.register(srd.OUTPUT_PYTHON) + # self.out_python = self.register(srd.OUTPUT_PYTHON) self.out_ann = self.register(srd.OUTPUT_ANN) def putx(self, data): - # Helper for annotations which span exactly one I2C packet. + # Helper for annotations which span exactly one I²C packet. self.put(self.ss, self.es, self.out_ann, data) def putb(self, data): - # Helper for annotations which span a block of I2C packets. + # Helper for annotations which span a block of I²C packets. self.put(self.block_start_sample, self.block_end_sample, self.out_ann, data) @@ -157,12 +155,12 @@ class Decoder(srd.Decoder): def decode(self, ss, es, data): cmd, databyte = data - # Store the start/end samples of this I2C packet. + # Store the start/end samples of this I²C packet. self.ss, self.es = ss, es # State machine. if self.state == 'IDLE': - # Wait for an I2C START condition. + # Wait for an I²C START condition. if cmd != 'START': return self.state = 'GET SLAVE ADDR'