summaryrefslogtreecommitdiff
path: root/decoders/onewire_transport/onewire_transport.py
diff options
context:
space:
mode:
authorIztok Jeras <iztok.jeras@gmail.com>2012-07-17 21:50:08 +0200
committerIztok Jeras <iztok.jeras@gmail.com>2012-07-17 21:50:08 +0200
commit4dfff747ed380c8cda9410b5a7d3d97c59a64a9a (patch)
treeb36d935c6e57168d6f5c4fa42b43ea1cfa352d49 /decoders/onewire_transport/onewire_transport.py
parent758d2ea98ad32adca6d1b76b982ec101ad363ac7 (diff)
downloadlibsigrokdecode-4dfff747ed380c8cda9410b5a7d3d97c59a64a9a.tar.gz
libsigrokdecode-4dfff747ed380c8cda9410b5a7d3d97c59a64a9a.zip
onewire: fixed an issue caused by renaming a transport layer command
Diffstat (limited to 'decoders/onewire_transport/onewire_transport.py')
-rw-r--r--decoders/onewire_transport/onewire_transport.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/decoders/onewire_transport/onewire_transport.py b/decoders/onewire_transport/onewire_transport.py
index 5481bd7..e787091 100644
--- a/decoders/onewire_transport/onewire_transport.py
+++ b/decoders/onewire_transport/onewire_transport.py
@@ -95,9 +95,11 @@ class Decoder(srd.Decoder):
self.state = "UNRECOGNIZED"
elif (self.state == "READ SCRATCHPAD"):
self.put(ss, es, self.out_ann, [0, ['SCRATCHPAD DATA: 0x%02x' % (val)]])
- elif (self.state == "TEMPERATURE CONVERSION"):
+ elif (self.state == "CONVERT TEMPERATURE"):
self.put(ss, es, self.out_ann, [0, ['TEMPERATURE CONVERSION STATUS: 0x%02x' % (val)]])
+ elif (self.state in command.values()):
+ self.put(ss, es, self.out_ann, [0, ['TODO "%s": 0x%02x' % (self.state, val)]])
elif (self.state == "UNRECOGNIZED"):
- self.put(ss, es, self.out_ann, [0, ['UNRECOGNIZED: 0x%02x' % (val)]])
+ self.put(ss, es, self.out_ann, [0, ['UNRECOGNIZED COMMAND: 0x%02x' % (val)]])
else:
raise Exception('Invalid state: %s' % self.state)