summaryrefslogtreecommitdiff
path: root/decoders/pan1321
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2012-01-25 22:11:38 +0100
committerUwe Hermann <uwe@hermann-uwe.de>2012-01-25 23:49:32 +0100
commitdecde15ecb51b3326b31019af61e0a729b9c61d0 (patch)
tree362aefd1a9759731bdf8ee2cc3d533c83a7faa9a /decoders/pan1321
parent385508e9b12d87519f9144a67e7682b46a592200 (diff)
downloadlibsigrokdecode-decde15ecb51b3326b31019af61e0a729b9c61d0.tar.gz
libsigrokdecode-decde15ecb51b3326b31019af61e0a729b9c61d0.zip
srd: All PDs: Various fixes, cosmetics.
- List all API methods and metadata variables in all PDs to make things easier and more consistent for new PD writers. - Fix probe assignment in a few PDs. - Raise exceptions upon invalid states of the PD state machines (bug).
Diffstat (limited to 'decoders/pan1321')
-rw-r--r--decoders/pan1321/pan1321.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/decoders/pan1321/pan1321.py b/decoders/pan1321/pan1321.py
index 2c86449..f383e00 100644
--- a/decoders/pan1321/pan1321.py
+++ b/decoders/pan1321/pan1321.py
@@ -47,6 +47,7 @@ class Decoder(srd.Decoder):
inputs = ['uart']
outputs = ['pan1321']
probes = []
+ extra_probes = []
options = {}
annotations = [
['ASCII', 'TODO: description'],
@@ -73,7 +74,7 @@ class Decoder(srd.Decoder):
[ANN_ASCII, ['Host set the Bluetooth name to ' + name]])
else:
self.put(ss, es, self.out_ann,
- [ANN_ASCII, ['Host sent unsupported command']])
+ [ANN_ASCII, ['Host sent unsupported command: %s' % s]])
self.cmd[rxtx] = ''
def handle_device_reply(self, ss, es, rxtx, s):
@@ -89,7 +90,7 @@ class Decoder(srd.Decoder):
[ANN_ASCII, ['Device sent error code ' + error]])
else:
self.put(ss, es, self.out_ann,
- [ANN_ASCII, ['Device sent an unknown reply']])
+ [ANN_ASCII, ['Device sent an unknown reply: %s' % s]])
self.cmd[rxtx] = ''
def decode(self, ss, es, data):
@@ -112,5 +113,5 @@ class Decoder(srd.Decoder):
elif rxtx == TX:
self.handle_host_command(ss, es, rxtx, self.cmd[rxtx])
else:
- pass # TODO: Error.
+ raise Exception('Invalid rxtx value: %d' % rxtx)