From: Uwe Hermann Date: Wed, 13 Jun 2012 17:09:05 +0000 (+0200) Subject: srd: Fix non-working PAN1321 decoder. X-Git-Tag: libsigrokdecode-0.1.1~84 X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=commitdiff_plain;h=140149cb9803789402328b01a378d43d59c5d8a7 srd: Fix non-working PAN1321 decoder. --- diff --git a/decoders/pan1321/pan1321.py b/decoders/pan1321/pan1321.py index da981f2..773e02d 100644 --- a/decoders/pan1321/pan1321.py +++ b/decoders/pan1321/pan1321.py @@ -56,30 +56,30 @@ class Decoder(srd.Decoder): if s.startswith('AT+JSEC'): pin = s[-4:] self.put(ss, es, self.out_ann, - [ANN_ASCII, ['Host set the Bluetooth PIN to ' + pin]]) + [0, ['Host set the Bluetooth PIN to ' + pin]]) elif s.startswith('AT+JSLN'): name = s[s.find(',') + 1:] self.put(ss, es, self.out_ann, - [ANN_ASCII, ['Host set the Bluetooth name to ' + name]]) + [0, ['Host set the Bluetooth name to ' + name]]) else: self.put(ss, es, self.out_ann, - [ANN_ASCII, ['Host sent unsupported command: %s' % s]]) + [0, ['Host sent unsupported command: %s' % s]]) self.cmd[rxtx] = '' def handle_device_reply(self, ss, es, rxtx, s): if s == 'ROK': self.put(ss, es, self.out_ann, - [ANN_ASCII, ['Device initialized correctly']]) + [0, ['Device initialized correctly']]) elif s == 'OK': self.put(ss, es, self.out_ann, - [ANN_ASCII, ['Device acknowledged last command']]) + [0, ['Device acknowledged last command']]) elif s.startswith('ERR'): error = s[s.find('=') + 1:] self.put(ss, es, self.out_ann, - [ANN_ASCII, ['Device sent error code ' + error]]) + [0, ['Device sent error code ' + error]]) else: self.put(ss, es, self.out_ann, - [ANN_ASCII, ['Device sent an unknown reply: %s' % s]]) + [0, ['Device sent an unknown reply: %s' % s]]) self.cmd[rxtx] = '' def decode(self, ss, es, data):