Thread: encoders
View Single Post
  #10   Spotlight this post!  
Unread 12-01-2005, 18:19
cbolin's Avatar
cbolin cbolin is offline
Programming & Electrical
FRC #0342 (Burning Magnetos)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Charleston, SC
Posts: 72
cbolin is a splendid one to beholdcbolin is a splendid one to beholdcbolin is a splendid one to beholdcbolin is a splendid one to beholdcbolin is a splendid one to beholdcbolin is a splendid one to beholdcbolin is a splendid one to behold
Re: encoders

Stephen,
Regarding your first code posting
Code:
static long lec = 0;            //lec = encoder count
Did someone explain that if you initialize "lec" every time this function is called, it will always be zerod? You could get rid of the 'lec = 0'...that way it would always remember the last value (which is what you were trying to do).

If you already figured this out or I missed this in the above response...just ignore what I said. :-)

Regards,
ChuckB
__________________
Team 342 Programming & Control Systems
Good luck and have fun!