|
Re: How to assign buttons in 2015
Sorry if I'm misunderstanding, but I think you're asking the question of how you can change which button does what on the robot, correct?
If you want to get a different button on the controller, you simply need to change which index of the array you are getting. In previous years, you used the Cluster, which you could then Unbundle By Name to get the values ("Button 1", "Button 2", etc.). You would now get these values from the "Buttons" array with Index Array. (now use index "0", "1", etc.) In order to change the assignments, you just need to change what index you are reading from in the array.
I've included a small piece of sample code to put into your Teleop for driving Mecanum, but I think it can also be able to run it on the driver station to get the axis values. The front panel has an Indicator to show you what the numbers in the blue Constant blocks (Block Diagram) should be.
|