Quote:
|
Originally Posted by cbolin
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).
|
Actually, Chuck, because lec is declared static, it will only be initialized once, not every time the function is called.