sjstein / miniRDproject

A miniature railroad controller for train sims
0 stars 0 forks source link

Bug in scale routine (main.py) #14

Open sjstein opened 3 weeks ago

sjstein commented 3 weeks ago

Line 92 is missing an offset.

The line: scaled_val = int(r8max_val * (value / (hval - lval))) should be changed to: scaled_val = int(r8max_val * ((value - lval)/ (hval - lval)))