diff options
| author | Selene ToyKeeper | 2020-08-30 15:49:26 -0600 |
|---|---|---|
| committer | Selene ToyKeeper | 2020-08-30 15:49:26 -0600 |
| commit | 4a6b37f6e7bf82c861de0849511aacdcdabee622 (patch) | |
| tree | 5f62a1d48d18f1c998131da8209730c320152754 | |
| parent | attempt to fix laggy voltage readings right after waking, on FW3A (diff) | |
| download | anduril-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)
| -rwxr-xr-x | spaghetti-monster/anduril/steps.py | 2 |
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): |
