summaryrefslogtreecommitdiff
path: root/digital/io/tools/io
diff options
context:
space:
mode:
authorNicolas Schodet2009-02-09 20:05:30 +0100
committerNicolas Schodet2009-02-09 20:05:30 +0100
commit2e95e3a33bcb34aeec66551503c692c1cb80ab61 (patch)
tree6b763ee0d1bf458da0ced13f44535b42f3b8efb8 /digital/io/tools/io
parent552b28da98a387d13aea7403a7e72732a913277d (diff)
* all python:
- changed tabs to spaces.
Diffstat (limited to 'digital/io/tools/io')
-rw-r--r--digital/io/tools/io/init.py8
-rw-r--r--digital/io/tools/io/io.py40
2 files changed, 24 insertions, 24 deletions
diff --git a/digital/io/tools/io/init.py b/digital/io/tools/io/init.py
index 12c6bb9a..7b8d2b8a 100644
--- a/digital/io/tools/io/init.py
+++ b/digital/io/tools/io/init.py
@@ -1,6 +1,6 @@
"""Default parameters for io."""
host = dict (
- trap = ((1, 255), (1, 255), (1, 255), (1, 255), (1, 255), (1, 255)),
- sharp_threshold = ((0x7f, 0x90), (0x7f, 0x90), (0x7f, 0x90),
- (0x7f, 0x90), (0x7f, 0x90)),
- )
+ trap = ((1, 255), (1, 255), (1, 255), (1, 255), (1, 255), (1, 255)),
+ sharp_threshold = ((0x7f, 0x90), (0x7f, 0x90), (0x7f, 0x90),
+ (0x7f, 0x90), (0x7f, 0x90)),
+ )
diff --git a/digital/io/tools/io/io.py b/digital/io/tools/io/io.py
index 8b78a8cc..5d2826a1 100644
--- a/digital/io/tools/io/io.py
+++ b/digital/io/tools/io/io.py
@@ -3,34 +3,34 @@ import proto, time
class Io:
def __init__ (self, file, time = time.time, **param):
- self.proto = proto.Proto (file, time, 0.1)
- self.async = False
- self.param = param
- self.send_param ()
+ self.proto = proto.Proto (file, time, 0.1)
+ self.async = False
+ self.param = param
+ self.send_param ()
def send_param (self):
- p = self.param
- for i, t in enumerate (p['trap']):
- self.proto.send ('t', 'BBB', i, t[0], t[1])
- for i, t in enumerate (p['sharp_threshold']):
- self.proto.send ('h', 'BHH', i, t[0], t[1])
+ p = self.param
+ for i, t in enumerate (p['trap']):
+ self.proto.send ('t', 'BBB', i, t[0], t[1])
+ for i, t in enumerate (p['sharp_threshold']):
+ self.proto.send ('h', 'BHH', i, t[0], t[1])
def write_eeprom (self):
- self.proto.send ('p', 'BB', ord ('E'), ord ('s'))
- time.sleep (1)
- self.proto.wait (lambda: True)
+ self.proto.send ('p', 'BB', ord ('E'), ord ('s'))
+ time.sleep (1)
+ self.proto.wait (lambda: True)
def reset (self):
- self.proto.send ('w')
- self.proto.send ('w', 'H', 0)
- self.proto.send ('z')
- self.proto.send ('z')
+ self.proto.send ('w')
+ self.proto.send ('w', 'H', 0)
+ self.proto.send ('z')
+ self.proto.send ('z')
def close (self):
- self.reset ()
- self.wait (lambda: True)
- self.proto.file.close ()
+ self.reset ()
+ self.wait (lambda: True)
+ self.proto.file.close ()
def fileno (self):
- return self.proto.fileno ()
+ return self.proto.fileno ()