aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSelene ToyKeeper2020-08-30 15:49:26 -0600
committerSelene ToyKeeper2020-08-30 15:49:26 -0600
commit4a6b37f6e7bf82c861de0849511aacdcdabee622 (patch)
tree5f62a1d48d18f1c998131da8209730c320152754
parentattempt to fix laggy voltage readings right after waking, on FW3A (diff)
downloadanduril-4a6b37f6e7bf82c861de0849511aacdcdabee622.tar.gz
anduril-4a6b37f6e7bf82c861de0849511aacdcdabee622.tar.bz2
anduril-4a6b37f6e7bf82c861de0849511aacdcdabee622.zip
steps.py: fixed python3 floating-point error
(division of integers produces floats in python3, but not python2... so make int result explicit)
Diffstat (limited to '')
-rwxr-xr-xspaghetti-monster/anduril/steps.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/spaghetti-monster/anduril/steps.py b/spaghetti-monster/anduril/steps.py
index 9056ea3..e19c9a6 100755
--- a/spaghetti-monster/anduril/steps.py
+++ b/spaghetti-monster/anduril/steps.py
@@ -32,7 +32,7 @@ def nearest_level(target, floor, ceil, steps):
#if (! ramp_style): return target;
ramp_range = ceil - floor;
- ramp_discrete_step_size = ramp_range / (steps-1);
+ ramp_discrete_step_size = int(ramp_range / (steps-1));
this_level = floor;
for i in range(steps):