Quote:
Originally Posted by mrmummert
I declared it as
rightStick(1, 3, 11),
leftStick(2, 3, 11),
....
also is this stated properly for victors?
if ......
{victor1.Set(1.0);}
|
You are declaring the joysticks as having 3 axes and 11 buttons and on port 1 and 2 respectively. That looks fine. I checked the wpi library source code and it should work. There must be something else in your code that is interfering. My experience with robot programming is that you can stare at a segment of code and it looks perfectly fine but it is other part of the code that was the problem. For example:
Code:
if (rightStick.GetRawButton(4))
{
Sol1->Set(true);
}
...
...
// A long way down the code if you have:
Sol1->Set(false); // This will negate what you were trying to do.
In the past, we had code to run the motors but the motors were not running. We even put some print statement in the code to make sure the code to turn the motor on was executed but the motors were still not running. It turns out some function call soon after was turning off the motors immediately. This is just to demonstrate when you have a problem that doesn't make sense, look wider.