Go to Post remember to turn the robot on. - Laura_587 [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Spotlight this post!  
Unread 01-28-2013, 03:03 PM
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 7,997
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
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 07:50 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi