From 4180cba9a51acd32f69f0f8628bb746ea3e12be6 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Sat, 31 Mar 2012 17:04:50 +0200 Subject: srd: Decoders: Fix/simplify samplenum usage. --- decoders/i2c/i2c.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'decoders/i2c') diff --git a/decoders/i2c/i2c.py b/decoders/i2c/i2c.py index cc70e96..5f67d35 100644 --- a/decoders/i2c/i2c.py +++ b/decoders/i2c/i2c.py @@ -198,8 +198,7 @@ class Decoder(srd.Decoder): super(Decoder, self).put(self.startsample, self.samplenum, output_id, data) def decode(self, ss, es, data): - for samplenum, (scl, sda) in data: - self.samplenum = samplenum + for (self.samplenum, (scl, sda)) in data: # First sample: Save SCL/SDA value. if self.oldscl == None: -- cgit v1.2.3-70-g09d2