View Single Post
  #17   Spotlight this post!  
Unread 16-02-2011, 15:03
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Encoder fixed in WPILib 2011?

Quote:
Originally Posted by Jeanne Boyarsky View Post
How did you create the first (dummy) encoder? Instantiating using the same arguments gives channel in use errors, no?
If you instantiate the DigitalInputs first, then pass those into the encoder constructors, you will not get the errors. The errors happen when the encoder tries to construct DigitalInputs for the same channels more than once.

By the way, I found that it is not always the second (odd) decoder that works.

See this thread.

In 4x mode, the 2 odd ones work. In 2x or 1x mode, the first 3 even ones work and the last one (odd) works.

-Joe