|
Re: Motor Speed with joysticks
One way to do this would be to pass the joystick values through a case structure before they go to the Robot Drive VI you are using (Arcade, Tank, etc.)
Wire the two buttons you want to have pressed into an AND and the result of the AND into the Case Selector Terminal (the little green question mark). Now if both buttons are pressed you will be in the True case and if either or both aren't pressed you will be in the False case.
Now we need to put the correct operations in each case. In the True case you want full forward on the sticks to be full power, this means that the joystick values should pass straight through the case structure unmodified.
In the false case you want to scale the value down to 25% of the maximum. To accomplish this divide each of the joystick axis values by 4 in the false case before passing them out.
__________________
2007 Wisconsin Regional Highest Rookie Seed & Regional Finalists (Thanks 930 & 2039)
2008 MN Regional Semifinalists (Thanks 2472 & 1756)
2009 Northstar Regional Semifinalists (Thanks 171 & 525)
|