]> sigrok.org Git - libsigrokdecode.git/commitdiff
onewire: fixed an issue caused by renaming a transport layer command
authorIztok Jeras <redacted>
Tue, 17 Jul 2012 19:50:08 +0000 (21:50 +0200)
committerIztok Jeras <redacted>
Tue, 17 Jul 2012 19:50:08 +0000 (21:50 +0200)
decoders/onewire_transport/onewire_transport.py

index 5481bd73d2289b1e161b4fe8454168da993b1f8a..e7870914aaf81ecce92ea359c9544bf8074e9fc9 100644 (file)
@@ -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)