View Single Post
  #7   Spotlight this post!  
Unread 28-01-2013, 15:03
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,042
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Problem with Shooter Code for FRC

Quote:
Originally Posted by VikingRobotics View Post
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)


Reply With Quote