![]() |
Relay Button Issue
We have two buttons that control one spike but in the code only one works if the other is commented out. How should we go about fixing this?
|
Re: Relay Button Issue
Well, the first thing you could do is show us your code.
|
Re: Relay Button Issue
Well, I coded an on/off switch recently and I came up with a one button toggle after a two button toggle.
Code:
public void teleopPeriodic()If you have any questions and comments, just reply or post, etc. Happy Competitions! |
Re: Relay Button Issue
So, what is the problem? I assume you fixed it? Regardless, you might want to create a separate thread in teleOp periodic since you have the 0.5s delays in there.
|
Re: Relay Button Issue
Here is how I did one button with CommandBased
Use something like (its explained in the OI class): Code:
ButtonObject.whenPressed(new ToggleSpike());Code:
private boolean state = false; |
| All times are GMT -5. The time now is 22:41. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi