View Single Post
  #17   Spotlight this post!  
Unread 30-08-2010, 20:54
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Encoder v.s. Steering

Here's a simple change:
You know you "OperationMode" input for selecting between Autonomous and Teleop?
You could reduce coding errors by changing that to an enumerated variable. (With enumerated variables, the options are selected from a menu instead of being typed in)
For an example of an enumerated variable, look at the "DerivedRobotState" control in Teleop.vi

You could do the same with your "kickposition" input.

Make sure they are typedefs when you save them, and not regular controls. (As typedefs, when you change the functional properties of the control file, all instances of that control are changed accordingly. That means if you add a new option to the enumerated variable, that option will exist in all instances of it as soon as you save the file.)
__________________
-- Marshal Horn

Last edited by kamocat : 30-08-2010 at 20:58.
Reply With Quote