1
0
Fork 0

ki266 dme indicator: fix off-by-one error

round to integer instead of truncate gives the correct distance.
This commit is contained in:
Torsten Dreyer 2015-10-19 22:44:41 +02:00
parent 9a53f8e331
commit 354b0947e0

View file

@ -67,10 +67,10 @@ ki266.update = func {
v = 0.0;
}
if( v < 100.0 ) {
me.milesDisplayNode.setIntValue( v * 10.0 );
me.milesDisplayNode.setIntValue( v * 10.0 + 0.5 );
me.leftDotNode.setBoolValue( 1 );
} else {
me.milesDisplayNode.setIntValue( v );
me.milesDisplayNode.setIntValue( v + 0.5 );
me.leftDotNode.setBoolValue( 0 );
}