]> sigrok.org Git - libsigrokdecode.git/commitdiff
ac97/lin: Remove some unneeded code snippets.
authorUwe Hermann <redacted>
Tue, 10 Dec 2019 21:05:51 +0000 (22:05 +0100)
committerUwe Hermann <redacted>
Tue, 10 Dec 2019 21:09:35 +0000 (22:09 +0100)
decoders/ac97/pd.py
decoders/lin/pd.py

index 94372530f429ef8a5b3b6415b281aa5109b236d2..68eb955baa1e5204496d87ccf0d68adc4ebf1329 100644 (file)
@@ -153,8 +153,6 @@ class Decoder(srd.Decoder):
         self.put(ss, es, self.out_binary, [cls, data])
 
     def __init__(self):
-        self.out_binary = None
-        self.out_ann = None
         self.reset()
 
     def reset(self):
@@ -168,10 +166,8 @@ class Decoder(srd.Decoder):
         }
 
     def start(self):
-        if not self.out_binary:
-            self.out_binary = self.register(srd.OUTPUT_BINARY)
-        if not self.out_ann:
-            self.out_ann = self.register(srd.OUTPUT_ANN)
+        self.out_binary = self.register(srd.OUTPUT_BINARY)
+        self.out_ann = self.register(srd.OUTPUT_ANN)
 
     def metadata(self, key, value):
         if key == srd.SRD_CONF_SAMPLERATE:
index 426cbf0520f4f0208fc905ac8a5af1addb0a6e56..a8b19980e3ea23b0377f7ec43ed1ed62723b4383 100644 (file)
@@ -89,7 +89,6 @@ class Decoder(srd.Decoder):
         self.lin_header = []
         self.lin_rsp = []
         self.lin_version = None
-        self.out_ann = None
         self.ss_block = None
         self.es_block = None