-
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
New indexer #17
base: master
Are you sure you want to change the base?
New indexer #17
Conversation
…lkIO.java and Intake.java
… addressed all issues that I could fix myself.
…tter fit everyone's wishes.
…exist but will work once Daniel commits.
…t.java class that extends Command.
…at CrateIO interacts with RobotMap.
|
||
@Override | ||
protected void interrupted() { | ||
RobotMap.Component.rollyBOI.setState(RollyBOI.GrabberState.CLASPED); |
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.
I wouldn't put anything here.
|
||
@Override | ||
protected boolean isFinished() { | ||
return 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.
Let it run indefinitely.
currentState = state; | ||
} | ||
|
||
public void safelySetState(GrabberState state) { |
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.
Don't worry about this.
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 code doesn't work
|
||
@Override | ||
protected boolean isFinished() { | ||
return 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.
@ajnadel said false
|
||
public IndexerGrabberSet(boolean clasped) { | ||
super(clasped ? "IndexerGrabberClasp" : "IndexerGrabberRelease"); | ||
requires(RobotMap.Component.rollyBOIGrabber); |
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 be RobotMap.Component.rollyBOI.grabber
if (motor.getName() != null) { | ||
name += motor.getName() + " "; | ||
} else { | ||
name += "unnamed motor "; |
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.
Maybe just make this Motor
?
} else { | ||
name += "unnamed motor "; | ||
} | ||
name += "idling"; |
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.
why do you want idling
between each motor? this seems odd...
@Override | ||
public void bindCommands() { | ||
RobotMap.Component.joystick.button3.onlyWhileHeld(new IntakeSquared()); | ||
RobotMap.Component.joystick.button4.onlyWhileHeld(new OuttakeSquared()); |
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 need buttons 5 & 6 to be mapped to forcefully opening and closing the rollyBOI pistons, in that order.
public class CrateIO extends Subsystem { | ||
|
||
public static final double INTAKE_SPEED = 1.0; | ||
public static final double OUTTAKE_SPEED = -1.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.
these should be 0.5
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.
at least for now, as that's what we were using today. they may change, but 100% is too much
setDefaultCommand(new MotorIdleGroup("CrateIO", this, rollerLeft, rollerRight)); | ||
} | ||
|
||
public void set(double 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.
if we never use this, delet?
setDefaultCommand(new MotorIdleGroup("RollyBOI", this, rollerLeft, rollerRight)); | ||
} | ||
|
||
public void set(double 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.
again we never use this right?
|
||
public class RollyBOI extends Subsystem { | ||
public static final double INTAKE_SPEED = -1.0; | ||
public static final double OUTTAKE_SPEED = 1.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.
set to 0.5
} | ||
|
||
public void set(boolean clasped) { | ||
if (clasped) this.grabber.set(CLASPED); |
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.
Ternary is for returning a value.
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 this makes you uncomfortable, we can add curly braces.
} | ||
|
||
public void set(boolean clasped) { | ||
if (clasped) this.grabber.set(CLASPED); |
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.
Ternary is for returning a value.
|
||
@Override | ||
protected boolean isFinished() { | ||
return 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.
@ajnadel said 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.
Looks good, though one more test needed.
Indexer and intake code. Added intake and outtake routines which use both indexer and intakerollers.