|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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? |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|