summaryrefslogtreecommitdiff
path: root/host/inter
diff options
context:
space:
mode:
authorNicolas Schodet2009-04-03 20:49:24 +0200
committerNicolas Schodet2009-04-03 20:49:24 +0200
commitf2f570e3a4ab89b867f0783e50d18a0e76cae903 (patch)
tree41b5fd27aa769b433d819ee9ead74b08f89e69bc /host/inter
parent022e9cd5751fd1bc4f85bd961ec30d39fdc61eb1 (diff)
* host/proto, host/inter, digital/asserv, digital/io:
- reverted r693. - no longer count on implicit float to interger conversion.
Diffstat (limited to 'host/inter')
-rw-r--r--host/inter/inter_node.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/host/inter/inter_node.py b/host/inter/inter_node.py
index b744cade..66eb5b2f 100644
--- a/host/inter/inter_node.py
+++ b/host/inter/inter_node.py
@@ -171,7 +171,7 @@ class InterNode (Inter):
v = 0.000571429 * d*d + -0.0752381 * d + 2.89107
else:
v = 2.2 / 10 * d
- v *= 1024 / 5
+ v = int (round (v * 1024 / 5))
assert v >= 0 and v < 1024
adc.value = v
adc.notify ()