From: Uwe Hermann Date: Sat, 7 Dec 2019 18:11:27 +0000 (+0100) Subject: decoders: Don't set self.samplenum. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=5d6d8896ded87ce72b42e68c77120008b2d1b779;p=libsigrokdecode.git decoders: Don't set self.samplenum. This is managed by the backend and should be read-only for PDs. --- diff --git a/decoders/dali/pd.py b/decoders/dali/pd.py index 5314746..8be494a 100644 --- a/decoders/dali/pd.py +++ b/decoders/dali/pd.py @@ -61,7 +61,6 @@ class Decoder(srd.Decoder): def reset(self): self.samplerate = None - self.samplenum = None self.edges, self.bits, self.ss_es_bits = [], [], [] self.state = 'IDLE' self.dev_type = None diff --git a/decoders/dsi/pd.py b/decoders/dsi/pd.py index 7ce9517..ea27079 100644 --- a/decoders/dsi/pd.py +++ b/decoders/dsi/pd.py @@ -56,7 +56,6 @@ class Decoder(srd.Decoder): def reset(self): self.samplerate = None - self.samplenum = None self.edges, self.bits, self.ss_es_bits = [], [], [] self.state = 'IDLE' diff --git a/decoders/ir_rc5/pd.py b/decoders/ir_rc5/pd.py index e1c47b6..bbe0ca7 100644 --- a/decoders/ir_rc5/pd.py +++ b/decoders/ir_rc5/pd.py @@ -61,7 +61,6 @@ class Decoder(srd.Decoder): def reset(self): self.samplerate = None - self.samplenum = None self.edges, self.bits, self.ss_es_bits = [], [], [] self.state = 'IDLE' diff --git a/decoders/ir_rc6/pd.py b/decoders/ir_rc6/pd.py index 90a55ae..e195dbd 100644 --- a/decoders/ir_rc6/pd.py +++ b/decoders/ir_rc6/pd.py @@ -58,7 +58,6 @@ class Decoder(srd.Decoder): def reset(self): self.samplerate = None - self.samplenum = None self.edges, self.deltas, self.bits = [], [], [] self.state = 'IDLE' self.mode = 0 diff --git a/decoders/lpc/pd.py b/decoders/lpc/pd.py index 5eb0983..095c8b5 100644 --- a/decoders/lpc/pd.py +++ b/decoders/lpc/pd.py @@ -142,7 +142,6 @@ class Decoder(srd.Decoder): def reset(self): self.state = 'IDLE' self.oldlclk = -1 - self.samplenum = 0 self.lad = -1 self.addr = 0 self.cur_nibble = 0 diff --git a/decoders/mdio/pd.py b/decoders/mdio/pd.py index 15414e5..1d060b0 100644 --- a/decoders/mdio/pd.py +++ b/decoders/mdio/pd.py @@ -67,7 +67,6 @@ class Decoder(srd.Decoder): def reset(self): self.illegal_bus = 0 - self.samplenum = -1 self.clause45_addr = -1 # Clause 45 is context sensitive. self.reset_decoder_state() diff --git a/decoders/ps2/pd.py b/decoders/ps2/pd.py index c23e019..194b0b1 100644 --- a/decoders/ps2/pd.py +++ b/decoders/ps2/pd.py @@ -58,7 +58,6 @@ class Decoder(srd.Decoder): def reset(self): self.bits = [] - self.samplenum = 0 self.bitcount = 0 def start(self): diff --git a/decoders/spi/pd.py b/decoders/spi/pd.py index 952b066..5f18d72 100644 --- a/decoders/spi/pd.py +++ b/decoders/spi/pd.py @@ -137,7 +137,6 @@ class Decoder(srd.Decoder): self.misobytes = [] self.mosibytes = [] self.ss_block = -1 - self.samplenum = -1 self.ss_transfer = -1 self.cs_was_deasserted = False self.have_cs = self.have_miso = self.have_mosi = None diff --git a/decoders/uart/pd.py b/decoders/uart/pd.py index 867585e..4ce6ef9 100644 --- a/decoders/uart/pd.py +++ b/decoders/uart/pd.py @@ -195,7 +195,6 @@ class Decoder(srd.Decoder): def reset(self): self.samplerate = None - self.samplenum = 0 self.frame_start = [-1, -1] self.frame_valid = [None, None] self.startbit = [-1, -1] diff --git a/decoders/usb_signalling/pd.py b/decoders/usb_signalling/pd.py index 3731036..626dcd0 100644 --- a/decoders/usb_signalling/pd.py +++ b/decoders/usb_signalling/pd.py @@ -142,7 +142,6 @@ class Decoder(srd.Decoder): self.samplerate = None self.oldsym = 'J' # The "idle" state is J. self.ss_block = None - self.samplenum = 0 self.bitrate = None self.bitwidth = None self.samplepos = None