View Single Post
  #4   Spotlight this post!  
Unread 18-02-2016, 17:53
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: CAN Talon Srx Encoder help needed

The links were active just long enough for me to glance at them and not see anything immediately relevant to the problem.

I did notice that you're doing some very weird things when reading the joystick buttons. You get two copies of the Device Reference, passing each to a separate Joystick Get, and you use two completely different methods of getting the desired button value out of the Buttons array. That won't cause the symptoms you describe, but it is definitely not a clean way to do it. You should just get the Buttons array once, and pull all of the values out of it that you need (using either the array-to-cluster or the Index Array method, but not both).

I didn't have a chance to see whether the PID values looked reasonable, or whether the limit switch settings made sense, or whether the control mode was set appropriately.