-
Notifications
You must be signed in to change notification settings - Fork 0
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
made the skeleton for score note command #20
Conversation
|
||
@Override | ||
public void execute() { | ||
scoring.runRoller(0); |
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.
we could replace the speed parameter with a default speed
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.
This should at least be a constant
|
||
@Override | ||
public boolean isFinished() { | ||
if (timer.get() > ScoringConstants.kSecondsToScore) { |
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.
if (timer.get() > ScoringConstants.kSecondsToScore) { | |
return timer.get() > ScoringConstants.kSecondsToScore; |
Seconds to score should be passed in as a parameter to the constructor. We also need a second constructor that takes no parameters. That way this can be
return this. secondsToScore ? timer.get() > this.secondsToScore : false
Which allows us to run the command until operator stops pressing the button in teleop and have auton end the command after a set time
@@ -14,6 +14,8 @@ public class ScoringConstants { | |||
public static final double kMaxSpeed = 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.
Please remove the k from everything except p I and d
… him to respond on slack
… him to respond on slack
|
||
@Override | ||
public boolean isFinished() { | ||
return (this.secondsToScore == 0 ? timer.get() > this.secondsToScore : 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.
return (this.secondsToScore == 0 ? timer.get() > this.secondsToScore : false); | |
return this.secondsToScore == 0 ? timer.get() > this.secondsToScore : false; |
These parenthesis are unnecessary
|
||
@Override | ||
public void execute() { | ||
scoring.runRoller(0); |
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.
This should at least be a constant
Pull Request
Issue Number
Closes #16
Comments
made the scoring constants skeleton