-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hotfix-break-coast switch -> master #82
base: master
Are you sure you want to change the base?
Conversation
src/main/java/edu/greenblitz/utils/breakCoastToggle/BreakCoastSwitch.java
Outdated
Show resolved
Hide resolved
src/main/java/edu/greenblitz/utils/breakCoastToggle/BreakCoastSwitch.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, consider adding this to the .gitignore file
@@ -112,13 +112,16 @@ public void robotPeriodic() { | |||
@Override | |||
public void disabledInit() { | |||
CommandScheduler.getInstance().cancelAll(); | |||
|
|||
BreakCoastSwitch.getInstance().setIsDisabled(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider changing the name to something clearer, such as
BreakCoastSwitch.getInstance().setIsDisabled(true); | |
BreakCoastSwitch.getInstance().setDisabled(true); |
In any case, couldn't you just get this from the driver station?
} | ||
|
||
|
||
|
||
@Override | ||
public void teleopInit() { | ||
CommandScheduler.getInstance().cancelAll(); | ||
BreakCoastSwitch.getInstance().setIsDisabled(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
|
||
private static BreakCoastSwitch instance; | ||
|
||
private boolean isDisabled; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the reason for this? 🤔
@@ -26,7 +35,9 @@ public static BreakCoastSwitch getInstance() { | |||
private BreakCoastSwitch(int id) { | |||
switchInput = new DigitalInput(id); | |||
subsystems = new HashMap<>(); | |||
this.switchPressCount = 0; | |||
this.switchPressCount = 1; | |||
debouncer = new Debouncer(0.1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is 0.1 in this context?
No description provided.