~toykeeper/flashlight-firmware/lume1

« back to all changes in this revision

Viewing changes to ToyKeeper/spaghetti-monster/anduril/steps.py

  • Committer: Selene Scriven
  • Date: 2020-08-30 21:49:26 UTC
  • Revision ID: bzr@toykeeper.net-20200830214926-rk21823ws4h65krn
steps.py: fixed python3 floating-point error
(division of integers produces floats in python3, but not python2... so make int result explicit)

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
    #if (! ramp_style): return target;
33
33
 
34
34
    ramp_range = ceil - floor;
35
 
    ramp_discrete_step_size = ramp_range / (steps-1);
 
35
    ramp_discrete_step_size = int(ramp_range / (steps-1));
36
36
    this_level = floor;
37
37
 
38
38
    for i in range(steps):