summaryrefslogtreecommitdiffhomepage
path: root/host/inter
diff options
context:
space:
mode:
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 ()