Quote:
Originally Posted by VikingRobotics
Thanks so much Ether. I will try it out next time I get to test the robot and let you guys know if I have any other issues. And I already called this method in the teleopPeriodic so that wasn't an issue.
|
If you want the other buttons (2 and 3) to be able to change the speed without having to press button1 to stop it first, then make a slight
code change as follows:
Code:
button1now = leftstick.getRawButton(button1);
if (button1now && ! button1previous) {if (speed != 0.3) speed=0.3; else speed=0.0;}
button1previous = button1now;
... repeat for buttons 2 and 3 (with their respective speeds of course)