Quote:
Originally Posted by microman1934
Thank you so much for the help guys, I just ended up doing this:
Code:
double rot = -stick.getX();
double speed = -stick.getY();
myRobot.arcadeDrive(rot*0.5, speed*0.5);
|
Glad you found a solution.
I would suggest you throw that in a if-else statement though, making the half-speed your default speed:
Code:
if(stick.getRawButton(1))
{
myRobot.arcadeDrive(-stick.getX(),-stick.getY());
}
else
{
double rot = -stick.getX();
double speed = -stick.getY();
myRobot.arcadeDrive(rot*0.5, speed*0.5);
}
This way, if in the middle of a match, your driver decides that he or she needs full speed, they have the ability to do so.
Just a suggestion. Of course, you may already have it that way in the rest of your code!