RCU Forums - View Single Post - CDI gr8flyer55
View Single Post
Old 09-18-2012 | 12:12 PM
  #337  
jakestew
Senior Member
 
Joined: Aug 2011
Posts: 144
Likes: 0
Received 0 Likes on 0 Posts
From: Moscow, ID
Default RE: CDI gr8flyer55

> I change the beginning and the end of the statement and then all comes in order. Un less you need the G262 for some reason to be first.

The last table value DOES need to be first. CurrentRev can be 255 and get rounded up to 256. Since it's an 8-bit variable setting it to 256 rolls it over to zero. That's why the last value ends up in the first slot in the array.

Zero is not a valid revolution time, so I'm just making use of the zero slot in the array to handle the case where the highest value gets rounded up.


-Jake