Quote:
|
Originally Posted by stephenthe1
do you mean set the "Get_Left_Encoder_Count()" function variable to 0? so your saying that Get_Left_Encoder_Count()" function variable holds its value every time it interrupts, even if I call it once and then call it again. that is definitely what Mr. Watson seems to have stated in his code. that makes sense, though I don't see how it holds the total value every time it interrupts without being declared as static.
|
Get_Left_Encoder_Count() is a function that interacts with a static variable in encoder.c named Left_Encoder_Count. Since Left_Encoder_Count is not exposed by encoder.h you can only get the value using the supplied function, Get_Left_Encoder_Count(). To change its value use the function Set_Left_Encoder_Count().