diff options
author | Bert Vermeulen <bert@biot.com> | 2011-12-27 22:15:53 +0100 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2011-12-28 12:17:13 +0100 |
commit | 5f802ec6473029e89d2db9cbd71cf0ce86a1b653 (patch) | |
tree | 684904590d08666bad5875a5ff0f026c76df7dff /decoders/i2c.py | |
parent | 1aef2f93a29f01168c04fd0478b29af290d8756b (diff) | |
download | libsigrokdecode-5f802ec6473029e89d2db9cbd71cf0ce86a1b653.tar.gz libsigrokdecode-5f802ec6473029e89d2db9cbd71cf0ce86a1b653.zip |
python 3 port
Diffstat (limited to 'decoders/i2c.py')
-rw-r--r-- | decoders/i2c.py | 6 |
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): |