summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2012-01-10 22:12:46 +0100
committerUwe Hermann <uwe@hermann-uwe.de>2012-01-10 22:12:46 +0100
commitd0e93c76e381eff58ca23949301f781b24ba4a8b (patch)
tree5b08a8a016bb28e1b91096444bd26168d4c83c79
parent677d597b072c0a1d2df81c5c193cd3678aef8d03 (diff)
downloadlibsigrokdecode-d0e93c76e381eff58ca23949301f781b24ba4a8b.tar.gz
libsigrokdecode-d0e93c76e381eff58ca23949301f781b24ba4a8b.zip
srd: Drop useless out_ann/out_proto init.
If those variables are used before start() was called, that's a bug anyway.
-rw-r--r--decoders/i2c.py2
-rw-r--r--decoders/mx25lxx05d.py2
-rw-r--r--decoders/nunchuk.py3
-rw-r--r--decoders/pan1321.py2
-rw-r--r--decoders/spi.py2
-rw-r--r--decoders/srd_usb.py3
-rw-r--r--decoders/transitioncounter.py2
-rw-r--r--decoders/uart.py3
8 files changed, 1 insertions, 18 deletions
diff --git a/decoders/i2c.py b/decoders/i2c.py
index 6982798..b8c56f7 100644
--- a/decoders/i2c.py
+++ b/decoders/i2c.py
@@ -149,8 +149,6 @@ class Decoder(srd.Decoder):
]
def __init__(self, **kwargs):
- self.out_proto = None
- self.out_ann = None
self.samplecnt = 0
self.bitcount = 0
self.databyte = 0
diff --git a/decoders/mx25lxx05d.py b/decoders/mx25lxx05d.py
index 72e1e1b..4a87fa4 100644
--- a/decoders/mx25lxx05d.py
+++ b/decoders/mx25lxx05d.py
@@ -172,8 +172,6 @@ class Decoder(srd.Decoder):
options = {} # TODO
def __init__(self, **kwargs):
- self.out_proto = None
- self.out_ann = None
self.state = IDLE
self.cmdstate = 1 # TODO
self.out = []
diff --git a/decoders/nunchuk.py b/decoders/nunchuk.py
index 009459d..86ec171 100644
--- a/decoders/nunchuk.py
+++ b/decoders/nunchuk.py
@@ -77,9 +77,6 @@ class Decoder(srd.Decoder):
options = {}
def __init__(self, **kwargs):
- self.out_proto = None
- self.out_ann = None
-
self.state = IDLE # TODO: Can we assume a certain initial state?
self.sx = self.sy = self.ax = self.ay = self.az = self.bz = self.bc = 0
diff --git a/decoders/pan1321.py b/decoders/pan1321.py
index 441cba0..2d86679 100644
--- a/decoders/pan1321.py
+++ b/decoders/pan1321.py
@@ -51,8 +51,6 @@ class Decoder(srd.Decoder):
]
def __init__(self, **kwargs):
- # self.out_proto = None
- self.out_ann = None
self.cmd = ''
def start(self, metadata):
diff --git a/decoders/spi.py b/decoders/spi.py
index 5529025..9d3940e 100644
--- a/decoders/spi.py
+++ b/decoders/spi.py
@@ -42,8 +42,6 @@ class Decoder(srd.Decoder):
self.rxcount = 0
self.rxdata = 0
self.bytesreceived = 0
- self.out_proto = None
- self.out_ann = None
def start(self, metadata):
# self.out_proto = self.add(srd.SRD_OUTPUT_PROTO, 'spi')
diff --git a/decoders/srd_usb.py b/decoders/srd_usb.py
index 842cf03..c6e6627 100644
--- a/decoders/srd_usb.py
+++ b/decoders/srd_usb.py
@@ -118,8 +118,7 @@ class Decoder(srd.Decoder):
options = {}
def __init__(self):
- self.out_proto = None
- self.out_ann = None
+ pass
def start(self, metadata):
self.rate = metadata['samplerate']
diff --git a/decoders/transitioncounter.py b/decoders/transitioncounter.py
index eaf8738..6092258 100644
--- a/decoders/transitioncounter.py
+++ b/decoders/transitioncounter.py
@@ -36,8 +36,6 @@ class Decoder(srd.Decoder):
options = {}
def __init__(self, **kwargs):
- self.out_proto = None
- self.out_ann = None
self.channels = -1
self.lastsample = None
diff --git a/decoders/uart.py b/decoders/uart.py
index c3a90ef..4546521 100644
--- a/decoders/uart.py
+++ b/decoders/uart.py
@@ -231,9 +231,6 @@ class Decoder(srd.Decoder):
]
def __init__(self, **kwargs):
- self.out_proto = None
- self.out_ann = None
-
# Set defaults, can be overridden in 'start'.
self.baudrate = 115200
self.num_data_bits = 8