Quote:
Originally Posted by notmattlythgoe
Change this line:
Code:
myRobot.tankDrive(stick1,stick2);
to this:
Code:
myRobot.tankDrive(stick1.getY() * 0.5, stick2.getY() * 0.5);
Then change the 0.5 to some scalar value depending on how much you want to scale it.
|
A simple way to still allow full top speed but give fine control at low speeds is to square the magnitude. You'll get 1/4 speed at half throw on your joystick, and full speed at full throw:
Code:
myRobot.tankDrive(stick1.getY() * Math.abs(stick1.getY()), stick2.getY() * Math.abs(stick2.getY());