ki266 dme indicator: fix off-by-one error
round to integer instead of truncate gives the correct distance.
This commit is contained in:
parent
9a53f8e331
commit
354b0947e0
1 changed files with 2 additions and 2 deletions
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue