From 5f802ec6473029e89d2db9cbd71cf0ce86a1b653 Mon Sep 17 00:00:00 2001 From: Bert Vermeulen Date: Tue, 27 Dec 2011 22:15:53 +0100 Subject: python 3 port --- decoders/i2c.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'decoders') diff --git a/decoders/i2c.py b/decoders/i2c.py index c57dd33..8b8e665 100644 --- a/decoders/i2c.py +++ b/decoders/i2c.py @@ -319,7 +319,7 @@ class Decoder(sigrok.Decoder): duration = self.bitcount * self.period else: duration = self.period - print "**", timeoffset, duration + print("**", timeoffset, duration) super(Decoder, self).put(timeoffset, duration, output_id, data) def decode(self, timeoffset, duration, data): @@ -327,9 +327,9 @@ class Decoder(sigrok.Decoder): self.timeoffset = timeoffset self.duration = duration - print "++", timeoffset, duration, len(data) + print("++", timeoffset, duration, len(data)) # duration of one bit in ps, only valid for this call to decode() - self.period = duration / len(data) + self.period = int(duration / len(data)) # We should accept a list of samples and iterate... for sample in sampleiter(data, self.unitsize): -- cgit v1.2.3-70-g09d2