Go to Post FIRST is an opportunity for me to tackle problems that have long been solved. - Madison [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
  #1   Spotlight this post!  
Unread 03-02-2014, 13:08
vandle879 vandle879 is offline
Registered User
FRC #0558
 
Join Date: Feb 2014
Location: Connecticut
Posts: 2
vandle879 is an unknown quantity at this point
Toggle When Pressed Option

First year doing Java and I don't have a robot yet to test on so I was wondering about the toggleWhenPressed option.

Does it simply just switch between the execute and end in whatever command its mapped to each time the same button is pressed?

Ex. Is this the correct usage?

OI

joystickButton1.toggleWhenPressed(new FireSolenoid());


FireSolenoid

...
protected void execute() {
Robot.shooter.pistonUp();
}
...
protected void end() {
Robot.shooter.pistonDown();
}



Will this just switch between pistonUp and pistonDown each time I press button 1?
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 09:34.

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