-
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
Stop intaking if note passed intake #159
Conversation
… are correct since it obviously isn't robot tested
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.
Some changes requested, but looks good otherwise
@@ -26,4 +26,8 @@ public default void updateInputs(IntakeIOInputs inputs) {} | |||
public default void setIntakeVoltage(double volts) {} | |||
|
|||
public default void setBeltVoltage(double volts) {} | |||
|
|||
public default boolean checkIfStopIntake() { |
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.
Could we please make this an input instead of a getter method?
io.setBeltVoltage(IntakeConstants.beltPower); | ||
if (!io.checkIfStopIntake()) { | ||
io.setIntakeVoltage(IntakeConstants.intakePower); | ||
io.setBeltVoltage(IntakeConstants.beltPower); |
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 don't want to stop running the belt motor here.
@@ -59,4 +67,15 @@ public void setIntakeVoltage(double volts) { | |||
public void setBeltVoltage(double volts) { | |||
belt.setControl(new VoltageOut(volts)); | |||
} | |||
|
|||
@Override | |||
public boolean checkIfStopIntake() { |
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're going to add a ToF sensor here so we can use that instead of current sensing and a timer.
deleting pull request, jack's already doing it haha |
…uest or a brance haha
Addressed in PR #155 |
I'm not sure if this will work and it's definitely not robot tested; I can adjust numbers or switch the off condition from the current timer to checking for belt current if needed?
Was this what you were looking for?