Other things such as serial IO are using interrupts as well. It occurs to me that the GIEL flag is disabled while they are working. If an encoder interrupt occured during this time, would its flag be set and would it be correctly handled once the current interrupt handler finished? It looks like it would but i am a little unsure. I'm grasping at straws.
I will try the library update once i get to competition, but i don't think thats the problem.
Quote:
|
Originally Posted by Mark McLeod
In addition to Eugene's suggestion here are some random observations.
I assume the printf's are only there due to the prior dropped count problem, since they can delay you enough themselves to cause dropped counts.
You know you are purposely dropping a count whenever you get to "p!!!!!!!"
|
yes
Quote:
|
Originally Posted by Mark McLeod
Your pan & tilt lines are reversed in code verses your later comments.
|
hrmm they are... the code is right though.
Quote:
|
Originally Posted by Mark McLeod
Whenever you reverse direction or hover at one position your logic is susceptible to extraneous counts as the A line can flicker on/off.
|
Thats a good point. Is there any way to disriminate this from legitimate ticks.