summaryrefslogtreecommitdiff
path: root/decoders
diff options
context:
space:
mode:
authorBert Vermeulen <bert@biot.com>2011-12-27 22:15:53 +0100
committerUwe Hermann <uwe@hermann-uwe.de>2011-12-28 12:17:13 +0100
commit5f802ec6473029e89d2db9cbd71cf0ce86a1b653 (patch)
tree684904590d08666bad5875a5ff0f026c76df7dff /decoders
parent1aef2f93a29f01168c04fd0478b29af290d8756b (diff)
downloadlibsigrokdecode-5f802ec6473029e89d2db9cbd71cf0ce86a1b653.tar.gz
libsigrokdecode-5f802ec6473029e89d2db9cbd71cf0ce86a1b653.zip
python 3 port
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):