summaryrefslogtreecommitdiff
path: root/decoders
diff options
context:
space:
mode:
Diffstat (limited to 'decoders')
-rw-r--r--decoders/i2c.py6
1 files changed, 3 insertions, 3 deletions
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):